fix(deletion): do not delete node when user is inside input closes #3895

This commit is contained in:
moklick
2024-02-13 10:50:57 +01:00
parent 3481f67ff5
commit b77fe9da1f
3 changed files with 16 additions and 4 deletions
@@ -113,7 +113,15 @@
{
...deleteKeyDefinition,
enabled: deleteKeyDefinition.key !== null,
callback: (detail) => !isInputDOMNode(detail.originalEvent) && deleteKeyPressed.set(true)
callback: (detail) => {
const isModifierKey =
detail.originalEvent.ctrlKey ||
detail.originalEvent.metaKey ||
detail.originalEvent.shiftKey;
if (!isModifierKey && !isInputDOMNode(detail.originalEvent)) {
deleteKeyPressed.set(true);
}
}
}
],
type: 'keydown'