W3C home > Mailing lists > Public > www-archive@w3.org > August 2012

Re: showAlert() patch

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 15 Aug 2012 17:49:37 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
cc: "www-archive@w3.org" <www-archive@w3.org>
Message-ID: <Pine.LNX.4.64.1208151747330.31973@ps20323.dreamhostps.com>
On Wed, 15 Aug 2012, Simon Pieters wrote:
>
> Re http://krijnhoetmer.nl/irc-logs/whatwg/20120604#l-615

Site is down.

Why would we want to do this?


> The script is inline in the spec. In the showAlert() function, just after the
> line:
> 
>       document.body.appendChild(currentAlert);
> 
> add:
> 
>       x.focus();
> 
> 
> also change:
> 
>   window.addEventListener('keydown', function (event) {
>     if (event.keyCode == 27) {
>       if (currentAlert)
>         closeAlert2();
>     } else {
>       closeAlert();
>     }
>   }, false);
> 
> to:
> 
>   window.addEventListener('keydown', function (event) {
>     if (event.keyCode == 27) {
>       if (currentAlert)
>         closeAlert2();
>     }
>   }, false);

That would make the dialog not start to fade out when you hit a key. Why 
would we want that?


> and remove:
> 
>   window.addEventListener('scroll', function (event) {
>     closeAlert();
>   }, false);

That would make the dialog not start to fade out when you scroll, why 
would you want that? Having the dialog still up after you've filed a bug 
is really annoying when you're trying to read the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 15 August 2012 17:50:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:18:55 GMT