focus change inside keypress event handler

(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 Wednesday, 28 October 2009 01:43:43 UTC