Skip to content

Commit 4380d3c

Browse files
committed
feat: fix touch event name
1 parent c99719d commit 4380d3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/utils/useOutsideClick/useOutsideClick.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export const useOutsideClick: UseOutsideClickType = ({ref, handler}) => {
2626
};
2727

2828
window.addEventListener('click', callback, {capture: true});
29-
window.addEventListener('touchstart', callback, {capture: true});
29+
window.addEventListener('touchend', callback, {capture: true});
3030

3131
return () => {
3232
window.removeEventListener('click', callback, {capture: true});
33-
window.removeEventListener('touchstart', callback, {capture: true});
33+
window.removeEventListener('touchend', callback, {capture: true});
3434
};
3535
}, [handler, ref]);
3636
};

0 commit comments

Comments
 (0)