W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] focus change inside keypress event handler

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Tue, 27 Oct 2009 21:43:06 -0400
Message-ID: <op.u2hlp41e1ejg13@sandra-svwliu01>
(CCing DOM list just in case anyone there has any comments)


<p><input onkeypress="this.nextSibling.focus()"><input></p>

, if you type a character in the first field, should the character be  
entered in the second field or the first?

In Firefox and Safari, it's the first field. In IE and Opera, it's the  

I'm pretty sure Opera's model is just old, willful compat with IE.

However, with  
it has an IE code path and a FF code path. In Opera's case, it gets the FF  
code path. That's good, but Opera's not compatible with FF in this case.

Right now, Opera has a workaround in its browser.js to solve this.  
However, I believe Opera might eventually change to be like FF and Safari  
(in which case the workaround would be removed), but not totally sure.

I do think FF and Safari's way makes more sense and I think most will  
agree.  Could you make sure the spec is clear on this.

(I think I mentioned this before but cannot find the message or text in  
HTML5 that says what to do for sure.)

Received on Tuesday, 27 October 2009 18:43:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC