New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 834189 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

KeyboardEvent.code value for illegal key event should be 'Unidentified' rather than null or empty string

Reported by dtoybo...@gmail.com, Apr 18 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Go to https://w3c.github.io/uievents/tools/key-event-viewer.html
2. Press key which is NOT supported by the OS.

What is the expected behavior?
The code value should be "Unidentified".

What went wrong?
Perhaps, it becomes null or empty string.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 65.0.3325.181  Channel: n/a
OS Version: 10.0
Flash Version: 

Older draft of UI Events code value, when code value cannot be resolved, it should've been empty string.  However, newer drafts declare "Unidentified" should be set.
https://w3c.github.io/uievents-code/#code-Unidentified

I'm trying to update some KeyboardEvent.code values of Firefox from legacy values to the latest values. However, I'm still afraid to use "Unidentified" since Chromium still uses null or empty string.

A lot of "Code" is mapped to NULL here:
https://cs.chromium.org/chromium/src/ui/events/keycodes/dom/keycode_converter_data.inc

And NULL mapped to empty string here:
https://cs.chromium.org/chromium/src/ui/events/keycodes/dom/keycode_converter.cc?l=120&rcl=81f17cb2241ab29dc07cc55f83e715ce2606fa0a
 

Comment 1 by dtoybo...@gmail.com, Apr 18 2018

Oops, Firefox's bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1264150

If Chromium agrees with this change, I'll fix the Firefox's bug.

Comment 2 by dtoybo...@gmail.com, Apr 18 2018

Oops, Firefox's bug is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1264150

If Chromium agrees with this change, I'll fix the Firefox's bug.
Labels: Needs-Triage-M65
 Issue 834188  has been merged into this issue.
Cc: sindhu.chelamcherla@chromium.org
Labels: Triaged-ET M-68 FoundIn-68 Target-68 OS-Linux
Status: Untriaged (was: Unconfirmed)
Able to reproduce issue on reported version 65.0.3325.181, on latest stable 66.0.3359.117 and on latest canary 68.0.3398.0 using Ubuntu 17.10 and Windows.

Issue is not seen in Mac.

Issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged.

Thanks!
834189.PNG
232 KB View Download
Cc: dtapu...@chromium.org
Status: Available (was: Untriaged)
Dave, when did we ship keyboardevent.code? Wasn't it recently? Any reason we didn't use unidentified from the beginning?

Comment 7 by mnak...@mozilla.com, Apr 20 2018

IIRC, the spec change was too late. Gary may remember something.

Sign in to add a comment