Merge pull request #472 from RohitChandel23/fix/462-select-all-focus-bug

Fix: Prevent Ctrl+A from selecting timeline when input is focused
This commit is contained in:
Maze
2025-07-28 00:13:07 +02:00
committed by GitHub
+9
View File
@@ -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