forked from farhoodlabs/paperclip
Prevent g c from leaking into global shortcuts
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -20,6 +20,10 @@ export function useKeyboardShortcuts({
|
||||
if (!enabled) return;
|
||||
|
||||
function handleKeyDown(e: KeyboardEvent) {
|
||||
if (e.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't fire shortcuts when typing in inputs
|
||||
if (isKeyboardShortcutTextInputTarget(e.target)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user