refactor(core): use event.composedPath as event target for input dom node check

This commit is contained in:
braks
2022-11-06 21:38:00 +01:00
committed by Braks
parent 56ba8a8656
commit 1f722f5494
+1 -1
View File
@@ -4,7 +4,7 @@ import { isBoolean, isFunction } from '@vueuse/core'
import useWindow from './useWindow'
function isInputDOMNode(event: KeyboardEvent): boolean {
const target = event.target as HTMLElement
const target = event.composedPath()[0] as HTMLElement
const hasAttribute = isFunction(target.hasAttribute) ? target.hasAttribute('contenteditable') : false
const closest = isFunction(target.closest) ? target.closest('.nokey') : null