Skip to content

Commit

Permalink
fix(useActiveElement): ignore if relatedTarget is set (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpschen committed Jan 3, 2023
1 parent d3d1db3 commit ae78d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useActiveElement/index.ts
Expand Up @@ -18,7 +18,7 @@ export function useActiveElement<T extends HTMLElement>(options: ConfigurableWin

if (window) {
useEventListener(window, 'blur', (event) => {
if (event.relatedTarget === null)
if (event.relatedTarget !== null)
return

activeElement.trigger()
Expand Down

0 comments on commit ae78d8b

Please sign in to comment.