Repository navigation
fix: let Escape pass a manual popover the user is not in - #5593
Merged
Merged
Conversation
The layer stack recorded every open popover, and the dispatcher tiered Escape under each with a boundary while the page's let-go and "back to the page" rung stood down under any layer. The browser never closes a manual popover on Escape, so a hover card shown as one left every Escape dead, wherever focus stood, until the card closed. `nativeModes()` (layer-stack.js) now names the layers that stand as a mode over the keys beneath them: modals, auto and hint popovers, and a manual popover while focus is inside it. The dispatcher's tiers and the page's Escape steps read it. Behaviour change: with a manual popover open that holds no focus, Escape takes the step it would take with none open. Closes #5582
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A manual popover the user isn't in, such as a hover card under the pointer, no longer turns Escape off for the whole page. The layer stack records every open popover. The dispatcher put an Escape boundary after each one, and the page's let-go (
navigation.release) and its "back to the page" rung stood down while any layer was open. The browser closes auto and hint popovers on Escape but never a manual one, so while one was open every press did nothing.nativeModes()inbrowser/runtime/keyboard/layer-stack.jsnow returns the layers that count as a mode over the keys beneath them: modals, auto and hint popovers, and a manual popover while focus is inside it. The dispatcher's tiers (dispatch.js) and both Escape steps inpage.jsread it instead of the whole stack. With a manual popover open that holds no focus, Escape now takes the step it would take with no popover open. With focus inside the card, the card stays a layer and the page beneath stays out of Escape's reach, as before. Other uses ofnativeLayers(), such as the close watcher's ordering, a modal floor and the media viewer, still read every layer.test_escape_passes_a_manual_popover_the_user_is_not_inuses the page from the issue. With the card open, Escape lets go of a focused link and leaves the panel's comment field. With focus inside the card, Escape still holds. Before the change the test fails at the link's Escape, and after it the test passes. The existing popover and Escape tests intest_key_scopes.pyandtest_render_floating_panel.py,pnpm run test:runtimeandpnpm run checkalso pass.Closes #5582 — automated triage