8000 fix(onClickOutside): adjust shouldListen handling timing (#3503) · vueuse/vueuse@6985152 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 6985152

Browse files
authored
fix(onClickOutside): adjust shouldListen handling timing (#3503)
1 parent 6040e1c commit 6985152

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/core/onClickOutside/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ export function onClickOutside<T extends OnClickOutsideOptions>(
9090
useEventListener(window, 'click', listener, { passive: true, capture }),
9191
useEventListener(window, 'pointerdown', (e) => {
9292
const el = unrefElement(target)
93-
if (el)
94-
shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e)
93+
shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el))
9594
}, { passive: true }),
9695
detectIframe && useEventListener(window, 'blur', (event) => {
9796
setTimeout(() => {

0 commit comments

Comments
 (0)
0