W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2009

focus change inside keypress event handler

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

With:

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

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

However, with  
<https://chaseonline.chase.com/chaseonline/signup/sso_signup_filter.jsp?LOB=RBGLogon>,  
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.)

-- 
Michael
Received on Wednesday, 28 October 2009 01:43:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT