AltGr + key which shouldn't cause any character causes inputting character which is inputted without AltGr
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: tszynalski, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
- Switch to the UK English or Polish keyboard layout on Windows.
- Type AltGr+K anywhere in Firefox (including browser UI).
Actual results:
The letter "k" was typed.
Expected results:
Nothing should happen. AltGr+K are not bound to any characters in the UK or Polish keyboard layouts. Firefox is the only application which ignores AltGr in this way. The same problem of course occurs on any other keyboard layout which has AltGr (most non-US layouts).
I think this might be the result of the recent changes in how JS keyboard events are processed. Per the most recent W3C UI Events draft, if "AltGr+Key" is pressed, KeyboardEvent.altKey or KeyboardEvent.ctrlKey should be false (previously, both were true). Instead, the state of the AltGr modifier must be accessed via KeyboardEvent.getModiferState("AltGraph").
This is why, if you don't make a point of checking .getModifierState(), the event looks exactly as if bare "Key" was pressed. Maybe that's why Firefox sees it that way.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The priority flag is not set for this bug.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
![]() |
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Perhaps duplicate to bug 809410. :masayuki could you please take a look and suggest the priority for this one?
Assignee | ||
Comment 3•6 years ago
|
||
No, not dup of it. We should fix this, but not urgent.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Must be a regression of bug 900750. If so, this could be reproducible on Linux in theory. However, as far as I've tested, keyboard layouts on Linux can type something with every key with AltGraph
(Level 3 Shift
) modifier.
Assignee | ||
Comment 5•5 years ago
|
||
On Windows, AltGr
modifier state is represented with activating both
Alt
and Ctrl
modifiers. I.e., when AltGr
is pressed, any shortcut
keys whose modifier require Control
and/or Alt
because NativeKey
needs to consume both flags and set modifier state to only AltGraph
.
That means that we don't need to dispatch eKeyPress
event when AltGr
key
is pressed and the key does not produce a character since we've stopped
dispatching non-printable keypress
events on web content.
See the automated test changes for the detail in chrome script handling for
its detail.
Assignee | ||
Updated•5 years ago
|
Comment 7•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•4 years ago
|
Description
•