refactor(selection): make it possible to start a selection above a node #5342

This commit is contained in:
moklick
2025-10-15 15:15:07 +02:00
parent d9de28214a
commit 75aff8ef26
3 changed files with 35 additions and 11 deletions

View File

@@ -43,7 +43,6 @@ export function isInputDOMNode(event: KeyboardEvent): boolean {
if (target?.nodeType !== 1 /* Node.ELEMENT_NODE */) return false;
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');
}