Skip to content

Commit

Permalink
fix(onClickOutside): access correct document (#2404)
Browse files Browse the repository at this point in the history
  • Loading branch information
sibbng committed Nov 7, 2022
1 parent c913b8f commit f78c49a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/onClickOutside/index.ts
Expand Up @@ -81,8 +81,8 @@ export function onClickOutside<T extends OnClickOutsideOptions>(
detectIframe && useEventListener(window, 'blur', (event) => {
const el = unrefElement(target)
if (
document.activeElement?.tagName === 'IFRAME'
&& !el?.contains(document.activeElement)
window.document.activeElement?.tagName === 'IFRAME'
&& !el?.contains(window.document.activeElement)
)
handler(event as any)
}),
Expand Down

0 comments on commit f78c49a

Please sign in to comment.