Fix: Prevent Ctrl+A from selecting timeline when input is focused
This commit is contained in:
parent
14475dc9a6
commit
f6f26fc635
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue