Re: specification of "legacy" key events

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

>> * 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.

OK.

>> * 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
and
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
http://www.opera.com/
Opera - simply the best Internet experience

Received on Wednesday, 28 May 2008 19:49:13 UTC