W3C home > Mailing lists > Public > public-webapi@w3.org > May 2008

Re: specification of "legacy" key events

From: Hallvord R. M. Steen <hallvord@opera.com>
Date: Wed, 28 May 2008 21:47:50 +0200
To: olli@pettay.fi
Cc: public-webapi@w3.org
Message-ID: <op.ubvql0o7a3v5gv@hr-opera.oslo.opera.com>

On Wed, 28 May 2008 16:32:22 +0200, Olli Pettay <Olli.Pettay@helsinki.fi>  

>> * Text insertion events. The keypress and textInput events include  
>> complete information about the character the input is generating

> textInput isn't DOM0 event, right? It is (or will be defined) in DOM 3
> Events.

Yes, one of the questions I was trying to get at was how we should define  
relationships between the "legacy" and the DOM3 events. So my proposal is  
to define that keypress fires first and then textInput.

>>  All keys except dead keys fire the hardware reference events.
> ...
>  > The first time a dead key is pressed fires no
>> events at all.
> Based on testing on Windows Vista, all browsers do generate keydown/up  
> also with dead keys (at least with  and ). And pressing space creates
> then keydown/keypress/keyup (and input, except not in IE)
> On Linux things are different. FF3 fires only keyup (and input event  
> after space), Opera doesn't fire anything, not even input.
> So, I think we should follow the event handling which browsers have on
> Windows.


>> * If the key does not cause text input and is not the Escape key (i.e.  
>> if the key is not is an alphanumerical key, a punctuation key, a  
>> repeated press of a dead key or the Escape key), terminate this  
>> algorithm.
> Why this behavior? Opera and FF do dispatch keypress in many other cases  
> too. (And Safari doesn't dispatch with ESC).

This part is basically trying to make sense of and pin down something like  
what IE does, because
a) I thought it makes sense that way
b) Opera has had problems and caused web application bugs that as far as I  
remember were tracked down to us firing keypress events the web content  
did not expect.

Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
Opera - simply the best Internet experience
Received on Wednesday, 28 May 2008 19:49:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:27 UTC