mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
Fix: Prevent Ctrl+A from selecting timeline when input is focused
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user