NEW 110670
keydown generated instead of keyup when both of a pair of modifier keys are pressed and one is released
https://bugs.webkit.org/show_bug.cgi?id=110670
Summary keydown generated instead of keyup when both of a pair of modifier keys are p...
Christopher O'Donnell
Reported 2013-02-22 17:37:23 PST
With each set of paired modifier keys, when one of the keys is pressed, and then the other is pressed, and then either is released, a third keydown event is generated instead of the expected keyup. When the remaining key is released, a keyup event is generated as expected. The bug doesn't have to do with multiple physical keys sharing one numeric code (as is the case with each of option and shift), because command, which has distinct numeric codes for left and right, has the same problem. This bug is present in: - Chrome Canary 27.0.1420.0 (latest at time of filing) - Chrome 24.0.1312.57 - WebKit Nightly 6.0.2 (8536.26.17, 537+) (latest at time of filing) - Safari 6.0.2 (8536.26.17) To reproduce, load an HTML file with these contents: <!doctype html> <html> <head> <script> var log_type = function (e) { console.log(e.type, e.which); }; window.onkeydown = log_type; window.onkeyup = log_type; window.onkeypress = log_type; </script> </head> </html> In one of any of the above browser builds, open the Inspector's Console ("Log" in Safari), and type a key sequence that meets these rules: 1. Choose shift, option, or command. 2. Press and hold down both physical keys in that pair. 3. Release one of them. A third keydown event is produced, instead of the correct keyup event. 4. Release the other. A keyup event is produced as expected.
Attachments
Alexey Proskuryakov
Comment 1 2013-02-23 15:39:02 PST
The code that does this is at <http://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm#L305> (or equivalent for other ports). I don't know if there is a good way to fix this.
Note You need to log in before you can comment on or make changes to this bug.