fix(core): prevent delete action if inside input field

This commit is contained in:
braks
2024-04-24 09:40:11 +02:00
committed by Braks
parent b0f1bf0b85
commit 84969ab451

View File

@@ -123,7 +123,9 @@ export function useKeyPress(
(e) => {
modifierPressed = wasModifierPressed(e)
if (!modifierPressed && isInputDOMNode(e)) {
const preventAction = (!modifierPressed || (modifierPressed && !options.actInsideInputWithModifier)) && isInputDOMNode(e)
if (preventAction) {
return
}
@@ -138,7 +140,9 @@ export function useKeyPress(
(...args) => currentFilter(...args),
(e) => {
if (isPressed.value) {
if (!modifierPressed && isInputDOMNode(e)) {
const preventAction = (!modifierPressed || (modifierPressed && !options.actInsideInputWithModifier)) && isInputDOMNode(e)
if (preventAction) {
return
}