Skip to content

Commit

Permalink
fix(project): fix user menu not opening in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 4, 2021
1 parent f84c8b7 commit 395b9e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DetectOutsideClick/DetectOutsideClick.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const DetectOutsideClick = ({ callback, children }: Prop) => {
}
};

document.addEventListener('click', handleClick);
setTimeout(() => document.addEventListener('click', handleClick), 1);

return () => document.removeEventListener('click', handleClick);
}, [callback]);
Expand Down

0 comments on commit 395b9e8

Please sign in to comment.