[whatwg] focus change inside keypress event handler
Michael A. Puls II
shadow2531 at gmail.com
Tue Oct 27 18:43:06 PDT 2009
(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
More information about the whatwg
mailing list