Closed Bug 705034 Opened 14 years ago Closed 14 years ago

keypress triggers on wrong input/textarea if another is focused during keydown

Categories

(Core :: DOM: Events, defect)

8 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: laughinghan, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 Steps to reproduce: Go to http://jsfiddle.net/7j3xd/1/ Focus on the top textarea or input Hit the down arrow key Actual results: The event handlers report that keydown was triggered on the top textarea or input element, and that keypress was triggered on the bottom textarea or input element. Expected results: The event handlers report that keydown and keypress were triggered on the top textarea or input element, since that's where you hit the down arrow key.
The issue here is that keydown and keyup happen on different elements, right? What does the spec say about where keypress happens in this situation?
My mistake. I apologize for wasting your time. I assumed it was a bug in Gecko because it doesn't happen in WebKit--for the down arrow key, but that's actually because WebKit doesn't trigger keypress for arrow keys. In fact, it's just an unintuitive design decision by the spec.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.