Summary: | keypress event not fired for DELETE key | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Gaddis <gaddis> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | ap | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
I don't think keypress is supposed to be dispatched for Delete. Does this work in Internet Explorer? Firefox does respond with the 3 events for a DELETE key press. Opera does respond with the 3 events for a DELETE key press. IE responds with 2 events (keydown and keyup) for a DELETE key press. Thank you for the additional info. For keyboard event dispatch, our intention is to match IE behavior as closely as possible. |
Created attachment 34583 [details] test case html file The scenario: Event listeners are attached to the document for keydown, keypress, and keyup events. In the attached file, input_document.html, watch the console for evidence of the events fired from inside an text input. When "1" is pressed: onkeydown charCode = 0 onkeypress charCode = 49 onkeyup charCode = 0 When DELETE is pressed: onkeydown charCode = 0 onkeyup charCode = 0 (note the missing onkeypress) Other observations: This behavior does not change when the listeners are attached to the text input. Safari 3 reports all three events: onkeydown, onkeypress, onkeyup when the DELETE key is pressed.