Repository navigation
Close the menu on Escape release so the key-up doesn't leak to the window underneath - #19817
SirJul1337 wants to merge 1 commit into
Conversation
[Medium impact] The PR appears safe to merge; no actionable failures were found. SummaryThe menu now waits for Escape release before closing, so it keeps keyboard focus until the key is up.
|
|
Reproduced #18911 on a disposable Omarchy worker with Chromium: opening the menu with Super+Space and pressing Escape exits browser fullscreen on Held Escape, clearing a filter before closing, an intervening navigation key, uninstall-confirmation cancellation, and select/input cancellation behaved as intended. The CLI and focused menu, guard, budget, and filter-input suites passed on the worker. The first three Node-based tests needed the worker's already installed Node added to the SSH PATH before they could run. GPT-6 High in Codex reviewed the change. Opus 5.5 High and muse-wonder via pi, thinking high also found no blocking defects and accepted the reproduction; agreement does not guarantee independence. No branch changes or new automated regression test were added: the fullscreen leak was checked through the real compositor and browser. The Before: the base menu closes and Chromium leaves fullscreen. After: the same keys close the menu and preserve fullscreen. These captures show a local browser fullscreen probe rather than video playback. |


Fixes #18911
What changes
Pressing Esc to close the Omarchy menu over a fullscreen video also took the browser out of fullscreen. The menu closed on the key press, so its layer surface unmapped while Esc was still down, keyboard focus went back to the browser, and the browser got the release — Chromium and Firefox leave fullscreen on that key-up.
The menu now closes on the Escape release instead. The press arms the close (or clears the filter, as before); the release on the menu's own surface carries it out, so the key-up never reaches the window underneath. Any other key pressed in between disarms it, auto-repeat is ignored, and the flag resets whenever the menu opens or closes.
Scoped to the menu, which is where this was reported. Other overlays that close on an Escape press (clipboard, emojis, image picker, app grid,
PanelKeyCatcherpanels) have the same pattern and could follow the same way if this is the direction you want.Verification
In a QEMU VM on Omarchy 4.5.0-3 (Hyprland 0.56.2), with a Chromium page that logs
keyupandfullscreenchangeevents, fullscreened withf. Keys sent as real press/release via QMP.fullscreenchange, Chromium leaves fullscreen (hyprctl clientsfullscreen 2 → 0).ter, then Esc clears the filter and keeps the menu open; a second Esc closes it.Not checked: holding Esc for a long time (should now close on release instead of on the first repeat).
Screenshots
No visible change: the menu looks the same; only when it closes (key release instead of press) differs.