summaryrefslogtreecommitdiff
path: root/apps/web
diff options
context:
space:
mode:
authorrohit <rohitchandel2023@gmail.com>2025-07-27 23:52:59 +0530
committerrohit <rohitchandel2023@gmail.com>2025-07-27 23:52:59 +0530
commitf6f26fc635e10bd131a51d60c44728b5253d15aa (patch)
treecbe5fc446946a72d8f07c8b3ce675d6f6f0a4781 /apps/web
parent14475dc9a692aeffa8ef3caccecc1d3164ce4cfc (diff)
downloadopencut-f6f26fc635e10bd131a51d60c44728b5253d15aa.tar.gz
Fix: Prevent Ctrl+A from selecting timeline when input is focused
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/src/hooks/use-keybindings.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/web/src/hooks/use-keybindings.ts b/apps/web/src/hooks/use-keybindings.ts
index 10616900..7f6505b0 100644
--- a/apps/web/src/hooks/use-keybindings.ts
+++ b/apps/web/src/hooks/use-keybindings.ts
@@ -24,6 +24,15 @@ export function useKeybindingsListener() {
const boundAction = keybindings[binding];
if (!boundAction) return;
+ const activeElement = document.activeElement;
+ const isTextInput =
+ activeElement &&
+ (activeElement.tagName === "INPUT" ||
+ activeElement.tagName === "TEXTAREA" ||
+ (activeElement as HTMLElement).isContentEditable);
+
+ if (isTextInput) return;
+
ev.preventDefault();
// Handle actions with default arguments