Reserved keypresses are still given to web pages

RESOLVED DUPLICATE of bug 1203059

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 1203059
3 years ago
2 years ago

People

(Reporter: wbamberg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
In bug 1074971, keyboard shortcuts for basic browser actions like "New Tab" were made "reserved" in e10s, the idea being that web pages would not be able to (1) listen for them or (2) prevent the default browser behavior.

Although this does seem to have stopped pages from preventing the default, it seems as if web pages still get these events.

Here's an annoying web page: http://wbamberg.github.io/browser-shortcuts/.

It adds event listeners for all the listed shortcuts. When it catches one, it prints the one it captured in the box, and tries to prevent the default.
What I am seeing is that with Firefox, the web page *does* get the keypress, but it *is not* able to prevent the default.

Trying the same page in Chrome or Safari, and the page does not see the event.
Flags: needinfo?(felipc)
I actually can't reproduce this...
Hrm, I can reproduce on Nightly on OSX, but not on Windows.
Flags: needinfo?(wbamberg)
Oops, didn't mean to set needinfo, sorry for the spam.
Flags: needinfo?(wbamberg)
(In reply to :Gijs Kruitbosch from comment #2)
> Hrm, I can reproduce on Nightly on OSX, but not on Windows.

Ah, this is because the testcase from comment #0 is buggy and assumes accel means metaKey, whereas on non-mac it means ctrlKey.
I posted a potential explanation in bug 1052569 comment 27.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1203059
Flags: needinfo?(felipc)
You need to log in before you can comment on or make changes to this bug.