Closed Bug 1266437 Opened 8 years ago Closed 9 months ago

[UI Events] getModifierState("Meta") should return true when Windows logo key is pressed on Windows and Linux

Categories

(Core :: DOM: Events, defect, P3)

40 Branch
Desktop
All
defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox117 --- wontfix
firefox118 --- fixed

People

(Reporter: dtapuska, Assigned: masayuki)

References

Details

(Keywords: parity-chrome, Whiteboard: btpp-fixlater )

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Steps to reproduce:

The UI Events specification has changed

getModifierState("OS") has been removed as per change:
https://github.com/w3c/uievents-key/issues/9


Actual results:

event.meta returns false when the Windows Key is pressed.


Expected results:

event.meta returns true when Windows Key is pressed.
event.getModifierState("OS") should return false (because it shouldn't be supported)
event.getModifierState("Meta") should return true
Component: Untriaged → DOM: Events
Product: Firefox → Core
Whiteboard: btpp-fixlater
Blocks: 1232915
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Windows
Hardware: Unspecified → All
Summary: getModifierState("Meta") reports incorrect values on Windows → [UI Events] getModifierState("Meta") reports incorrect values on Windows
Whiteboard: btpp-fixlater → btpp-fixlater [parity-chrome]
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-chrome
Whiteboard: btpp-fixlater [parity-chrome] → btpp-fixlater
Priority: -- → P5
Severity: normal → S3
Assignee: nobody → masayuki
Status: NEW → ASSIGNED

I think that on Linux, we should stop treating the legacy Meta modifier state of Linux as "Meta" of DOM. It's typically mapped to Shift - Alt, so, I think that it should be treated as "Alt".

OS: Windows → All
Priority: P5 → P3
Hardware: All → Desktop
Summary: [UI Events] getModifierState("Meta") reports incorrect values on Windows → [UI Events] getModifierState("Meta") should return true when Windows logo key is pressed on Windows and Linux

On Windows, Windows logo key was mapped to "OS" modifier, and on Linux,
it's same and the key is called "Super" and "Hyper". That conformed to the
older UI Events spec.

However, UI Events declares that they should be mapped to "Meta" now.
https://www.w3.org/TR/uievents-key/#key-Meta

And Chrome handles it as the spec in Windows and Linux. Therefore, we should
align the behavior to them.

Note that we've treated the legacy "Meta" modifier on Linux as DOM "Meta"
modifier state, but we should stop it for avoiding confusion. Typically,
it's mapped to Shift - Alt. So, mapping it to DOM "Alt" must be better.

Finally, those check only IsMeta() but not IsOS(). I think that they
should've checked IsOS() too. Therefore, they will behave differently
in Windows and Linux.

Depends on D183479

Attachment #9343674 - Attachment description: Bug 1266437 - Drop "OS" modifier r=smaug!,m_kato!,karlt!,#dom-core → Bug 1266437 - Drop "OS" modifier r=smaug!,m_kato!,karlt!,Gijs!,#dom-core

The patch will be landed after the next merge (i.e., will be fixed in 118).

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/1b56e99dd221
Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
Backout by ctuns@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a000f750445
Backed out 2 changesets (bug 1266437, bug 1232918) for causing mochitest failures in test_autoplay_policy_key_blacklist.html CLOSED TREE
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/e369a23e9559
Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Duplicate of this bug: 1557094
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: