diff --git a/src/components/utils/useOutsideClick/useOutsideClick.tsx b/src/components/utils/useOutsideClick/useOutsideClick.tsx index 68a8351758..29fcc95763 100644 --- a/src/components/utils/useOutsideClick/useOutsideClick.tsx +++ b/src/components/utils/useOutsideClick/useOutsideClick.tsx @@ -25,11 +25,11 @@ export const useOutsideClick: UseOutsideClickType = ({ref, handler}) => { } }; - window.addEventListener('click', callback, {capture: true}); + window.addEventListener('mousedown', callback, {capture: true}); window.addEventListener('touchend', callback, {capture: true}); return () => { - window.removeEventListener('click', callback, {capture: true}); + window.removeEventListener('mousedown', callback, {capture: true}); window.removeEventListener('touchend', callback, {capture: true}); }; }, [handler, ref]);