Re: showAlert() patch

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 UTC