Created attachment 132820 [details] layout test The attached layout tests demonstrates that a keypress event fired at body (or some other non-editable node for that matter) can end up editing another part of the node, if one of the event handlers changes the selection. I've tested this with Chrome, and Safari, both will insert "a" into the text field. Firefox does not, IE9 does enter it. It's not clear to me, what the expected behavior is? See also bug 81660
WebKit/IE behavior makes good sense to me.
(In reply to comment #1) > WebKit/IE behavior makes good sense to me. what strikes me as strange is that the event target is the body element, while the text is inserted in the input field.
(In reply to comment #2) > (In reply to comment #1) > > WebKit/IE behavior makes good sense to me. > > what strikes me as strange is that the event target is the body element, while the text is inserted in the input field. But the focus is at the input element, right? The event target can't be changed once the event is dispatched, but the focus element can be changed after the fact.
(In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > WebKit/IE behavior makes good sense to me. > > > > what strikes me as strange is that the event target is the body element, while the text is inserted in the input field. > > But the focus is at the input element, right? The event target can't be changed once the event is dispatched, but the focus element can be changed after the fact. yes
Closing as invalid as this seems to be working as intended