Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
fix(clickOutside): set event propagation to capturing phase
Browse files Browse the repository at this point in the history
Co-authored-by: bielinskim <bielinskiim@gmail.com>
  • Loading branch information
bielinskim and bielinskim committed Jan 8, 2021
1 parent 0e3c45a commit c116592
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default (node, _options = {}) => {
node.dispatchEvent(new CustomEvent('clickOutside'));
}
}
document.addEventListener('click', detect, { passive: true });
document.addEventListener('click', detect, { passive: true, capture: true });
return {
destroy() {
document.removeEventListener('click', detect);
Expand Down

1 comment on commit c116592

@vercel
Copy link

@vercel vercel bot commented on c116592 Jan 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.