Closed Bug 1126673 Opened 5 years ago Closed 5 years ago

Enable KeyboardEvent.code in default settings of release build

Categories

(Core :: DOM: Events, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed
relnote-firefox --- 38+

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

After bug 1020139 is fixed, KeyboardEvent.code is almost stable for physical keyboard. With virtual keyboard which doesn't tell us scancode/hardware_keycode, we're using empty string value. So, I think that it shouldn't cause any problems with future's spec.

So, I think that it is time to enable KeyboardEvent.code in release build.

We're the first browser which implements KeyboardEvent.code!
Comment on attachment 8555849 [details] [diff] [review]
Patch

I landed bug 1020139 and already posted to platform-dev.
https://groups.google.com/forum/#!topic/mozilla.dev.platform/msOO2puNcKo

Let's enable it.
Attachment #8555849 - Flags: review?(bugs)
Comment on attachment 8555849 [details] [diff] [review]
Patch

I wonder if/when we need to figure out what to do with virtual keyboards
Attachment #8555849 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #3)
> Comment on attachment 8555849 [details] [diff] [review]
> Patch
> 
> I wonder if/when we need to figure out what to do with virtual keyboards

https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#code-virtual-keyboards

If virtual keyboard generates scancode, we should assume that it emulates physical keyboard. Otherwise, the code value MAY be empty string. This is valid for now. Even if specs will change .code value shouldn't be empty string every cases, the empty string value shouldn't cause compatibility problem because undefined keys even on PC keyboard is also empty string. So, empty string means that the browser just does not support the key.
https://hg.mozilla.org/mozilla-central/rev/195ac6681ba0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Release Note Request (optional, but appreciated)
[Why is this notable]: new/extended standard for keyboard events
[Suggested wording]: Implemented DOM3 Events KeyboardEvent.code
[Links (documentation, blog post, etc)]:
relnote-firefox: --- → ?
Added to Aurora/DevEd 38 release notes as:

Implemented DOM3 Events KeyboardEvent.code
You need to log in before you can comment on or make changes to this bug.