fix(core): prevent delete action if inside input field
This commit is contained in:
@@ -123,7 +123,9 @@ export function useKeyPress(
|
|||||||
(e) => {
|
(e) => {
|
||||||
modifierPressed = wasModifierPressed(e)
|
modifierPressed = wasModifierPressed(e)
|
||||||
|
|
||||||
if (!modifierPressed && isInputDOMNode(e)) {
|
const preventAction = (!modifierPressed || (modifierPressed && !options.actInsideInputWithModifier)) && isInputDOMNode(e)
|
||||||
|
|
||||||
|
if (preventAction) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +140,9 @@ export function useKeyPress(
|
|||||||
(...args) => currentFilter(...args),
|
(...args) => currentFilter(...args),
|
||||||
(e) => {
|
(e) => {
|
||||||
if (isPressed.value) {
|
if (isPressed.value) {
|
||||||
if (!modifierPressed && isInputDOMNode(e)) {
|
const preventAction = (!modifierPressed || (modifierPressed && !options.actInsideInputWithModifier)) && isInputDOMNode(e)
|
||||||
|
|
||||||
|
if (preventAction) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user