Skip to content

fix(hotkeys): handle shortcuts in capture phase (#1314) - #1390

Merged
perber merged 2 commits into
perber:mainfrom
richardmilles:fix/1314-hotkey-capture-phase
Aug 9, 2026
Merged

fix(hotkeys): handle shortcuts in capture phase (#1314)#1390
perber merged 2 commits into
perber:mainfrom
richardmilles:fix/1314-hotkey-capture-phase

Conversation

@richardmilles

Copy link
Copy Markdown
Contributor

Register global hotkeys in the capture phase so combos like Ctrl+Alt+P call preventDefault before the browser default.
Fixes #1314

@richardmilles
richardmilles requested a review from perber as a code owner August 7, 2026 09:36
HotKeyHandler renders useAppMode() -> useLocation(), which requires a
Router context. The new 'registers the keydown listener in the capture
phase' test rendered it bare, unlike every other test in this file,
causing test-frontend CI to fail.
@perber

perber commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix! CI's test-frontend job was failing on the new registers the keydown listener in the capture phase test — HotKeyHandler calls useAppMode()useLocation(), which needs router context, but that test rendered it without one (unlike the other tests in the file). Pushed a small follow-up commit wrapping it in MemoryRouter to match the rest of the file; all 3 tests pass now.

@perber
perber merged commit 3dcd163 into perber:main Aug 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not all Keyboard Shortcuts work as expected.

2 participants