Merge branch 'main' into migrate/svelte5

This commit is contained in:
peterkogo
2024-12-10 12:13:02 +01:00
17 changed files with 49 additions and 47 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ const inputTags = ['INPUT', 'SELECT', 'TEXTAREA'];
export function isInputDOMNode(event: KeyboardEvent): boolean {
// using composed path for handling shadow dom
const target = (event.composedPath?.()?.[0] || event.target) as HTMLElement;
const isInput = inputTags.includes(target?.nodeName) || target?.hasAttribute('contenteditable');
const isInput = inputTags.includes(target?.nodeName) || target?.hasAttribute?.('contenteditable');
// when an input field is focused we don't want to trigger deletion or movement of nodes
return isInput || !!target?.closest('.nokey');