From 1f722f549440ecb0fe363ad45c984b096ab21acf Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 6 Nov 2022 21:20:08 +0100 Subject: [PATCH] refactor(core): use `event.composedPath` as event target for input dom node check --- packages/core/src/composables/useKeyPress.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/composables/useKeyPress.ts b/packages/core/src/composables/useKeyPress.ts index 346201d0..f719cb60 100644 --- a/packages/core/src/composables/useKeyPress.ts +++ b/packages/core/src/composables/useKeyPress.ts @@ -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