Closed Bug 1594532 Opened 5 years ago Closed 5 years ago

alt+letter JS keyboard hotkey bindings don't work anymore

Categories

(Firefox :: Untriaged, defect)

70 Branch
Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: metastork, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

Running Ubuntu 19.10, Firefox 70.0

  1. Go to https://rawgit.com/jeresig/jquery.hotkeys/master/test-static-01.html (for JQuery hotkeys plugin) or https://wangchujiang.com/hotkeys/ (for a standalone JS hotkeys demo).
  2. Press alt+a, alt+q or any other alt+letter combinations, including alt+d and alt+f and other Menu-reserved shortcuts.

Actual results:

  1. alt+[letter] hotkeys just register as plain [letter] presses (or not at all in some cases) and don't get captured by the JS as intended by the keyboard bindings.

Expected results:

alt+[letter] hotkeys should be captured by JS as alt+[letter] rather than plain [letter] (or not at all, in some cases).

It was definitely possible to reserve these with JS and prevent from bubbling to the browser in prior FF versions, probably including version 69 or perhaps slightly earlier. And Chromium, for reference, currently still allows JS scripts to capture pretty much all of the alt+[letter] keys.

Solution:

Am not sure if there's a JS hack that would make some of these functions work again, but as it stands, the lack of alt+[letter] access this has broken some web-apps in Firefox that have bound hotkeys to access their own menus or other functionality, for example.

https://rawgit.com/jeresig/jquery.hotkeys/master/test-static-01.html work fine for me in Fx70.0 & Fx71b7 on Win10.

OS: Unspecified → Linux

Thanks Yang for looking into, indeed it appears to be something strange at my end. When booting a clean Ubuntu live CD those hotkeys also work as expected in Firefox. But something about my set up in both X11 and Wayland sessions, seems to block the Firefox DOM from capturing alt+letter combinations (though it works fine in all other software).

If someone else comes across this and has managed to solve it, please let me know.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

An update: through some trial and error I've finally managed to pinpoint the culprit as the new(ish) privacy.resistFingerprinting flag, so it seems to be a (limited) Firefox bug after all as far as I can tell (please let me know if possible to change the status of this bug to unresolved, or if I should post it as a new bug).

Steps to reproduce:
Set the privacy.resistFingerprinting flag to true in about:config.
Then try alt+letter combos via JS at the above-linked web-pages.

Actual result:
Alt+letter combinations get captured as plain letter combinations.

Expected result:
Alt+letter combinations should work, even if the fingerprint resist setting is enabled.

You need to log in before you can comment on or make changes to this bug.