Closed Bug 1376549 Opened 6 years ago Closed 6 years ago

APZ: Dispatch keyboard shortcuts hardcoded in ESM to content

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

We need to disable async keyboard scrolling when an event is processed in APZ that could change the focus until that event is processed by content and the focus is reconfirmed.

We are doing this for all non keyboard events processed by APZ, but there are some key events that we don't consider focus changing (like Tab) that should be.
The default action of tab keys is hardcoded in EventStateManager::PostHandleKeyEvent [1]. This patch hardcodes keyboard shortcuts that will dispatch input to content when it is a tab.

It'd be nice to have a way to not hardcode this, but this seems relatively contained.

[1] http://searchfox.org/mozilla-central/rev/fdb811340ac4e6b93703d72ee99217f3b1d250ac/dom/events/EventStateManager.cpp#2848
Attachment #8882061 - Flags: review?(bugmail)
Comment on attachment 8882061 [details] [diff] [review]
shortcut-tabs.patch

Review of attachment 8882061 [details] [diff] [review]:
-----------------------------------------------------------------

This is fine, but I'd prefer to call the function AppendHardcodedShortcuts since it deals with F6 in addition to tab, and the name makes it a bit more obvious why we are doing it.
Attachment #8882061 - Flags: review?(bugmail) → review+
Lowering the scope of the bug into something that can be landed now.
Summary: APZ: Handle all events whose default action could change focus → APZ: Dispatch keyboard shortcuts hardcoded in ESM to content
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/89be529dbce8
Prevent APZ handling of keyboard shortcuts hardcoded in ESM. r=kats
https://hg.mozilla.org/mozilla-central/rev/89be529dbce8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Depends on: 1378006
You need to log in before you can comment on or make changes to this bug.