fix: browser shortcuts intercepted by keyboard handlers #154
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
track:api
track:auto
track:core
track:deploy
track:infra
track:ui
v0.1.0
v0.1.1
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/delta#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Delta's keyboard handlers intercept browser-native shortcuts like
Ctrl+-(zoom out),Ctrl+=(zoom in),Ctrl+0(reset zoom),Ctrl+T(new tab),Ctrl+W(close tab), etc. For example, pressingCtrl+-toggles the sidebar instead of zooming out because the-key handler inglobal-keyboard.tsxhas noctrlKeyguard.Solution
Add a centralized
isBrowserShortcut()utility that detects browser-native key combinations (zoom, tab management, navigation, devtools, reload). Guard everywindow.addEventListener("keydown", ...)handler in the codebase with an early return when a browser shortcut is detected.