mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
fix: check disabled flag in global shortcut handler
The global shortcut handler never checked the `disabled` property on shortcut objects, causing disabled shortcuts to still intercept browser keystrokes via preventDefault(). This meant browser shortcuts like Ctrl+Shift+B (bookmarks bar) were always hijacked even when the app shortcut was disabled. Fixes #1079 Co-authored-by: Enrico Ros <enricoros@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,10 @@ function _handleGlobalShortcutKeyDown(event: KeyboardEvent) {
|
||||
(shortcut.shift && !event.shiftKey) || (!shortcut.shift && event.shiftKey))
|
||||
continue;
|
||||
|
||||
// Skip disabled shortcuts - let the browser handle the keystroke
|
||||
if (shortcut.disabled)
|
||||
continue;
|
||||
|
||||
// Skip if a text input element is focused and the shortcut opts into this guard
|
||||
if (shortcut.skipIfInput && _isTextInputFocused())
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user