Closed Bug 1025982 Opened 8 years ago Closed 8 years ago
Pressing "Digit1" key results in "Digit0" Keyboard
Event .code value (and so on)
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release) Build ID: 20140605174243 Steps to reproduce: 1. Use Firefox Nightly (I encountered this issue in version 33.0a1 (2014-06-16)) 2. Open this demo: http://jsfiddle.net/simevidas/FZJq9/ 3. Open the DevTools console 4. Click on the "Result" pane and then press the "1" key on your keyboard (the second key from the left in the top row, roughly above "Q") Actual results: The console logs "key = 1, code = Digit0". Expected results: The console should log "key = 1, code = Digit1". The spec defines that the second key from the left in the top row is "Digit1": https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-code.html#key-alphanumeric-writing-system.
> The console logs "key = 1, code = Digit0". I'm seeing "key = 1, code = Digit1" in a nightly, albeit on Mac. Is this Windows-specific?
Oh, yes. This must be platform specific. However, I'll check it on other platforms too. Thank you for the report!
Assignee: nobody → masayuki
Status: UNCONFIRMED → ASSIGNED
Component: DOM → DOM: Events
Ever confirmed: true
Version: 33 Branch → Trunk
Sorry for the mistake and not enough tested.
Attachment #8441229 - Flags: review?(jmathies)
Thank you for the very quick review! https://hg.mozilla.org/integration/mozilla-inbound/rev/1364fa15bdbd
I don't think that this should be uplift to Aurora because KeyboardEvent.code is disabled on release builds (Beta and Release) in default settings. However, if smaug doesn't think so, let's request the approval.
Don't feel strongly about this. Approval wouldn't harm, but probably doesn't really matter.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment on attachment 8441229 [details] [diff] [review] Patch [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 865649 User impact if declined: User may show this strange mapping only on Windows. Although, KeyboardEvent.code is disabled by prefs in 32 release build. And I don't like to add a document about this mistake in MDN's compatibility table since it causes messy table. Testing completed (on m-c, etc.): Landed on m-c. Risk to taking this patch (and alternatives if risky): No, just changed the mistake of new API feature which is implemented on 32. String or IDL/UUID changes made by this patch: No.
Attachment #8441229 - Flags: approval-mozilla-aurora?
Attachment #8441229 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/27de3ab6ed74 Oops, I forgot to address the landing on Aurora.
You need to log in before you can comment on or make changes to this bug.