Fixed callback firing on clickoutside but mousedown inside. (#2434)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Lucas Bordeau
2023-11-10 23:54:47 +01:00
committed by GitHub
parent 130a68dd26
commit 8906c23c63
3 changed files with 72 additions and 14 deletions

View File

@ -158,7 +158,7 @@ export const Modal = ({
useListenClickOutside({
refs: [modalRef],
callback: () => onClose?.(),
mode: ClickOutsideMode.absolute,
mode: ClickOutsideMode.comparePixels,
});
const {

View File

@ -56,7 +56,7 @@ export const RightDrawer = () => {
useListenClickOutside({
refs: [rightDrawerRef],
callback: () => closeRightDrawer(),
mode: ClickOutsideMode.absolute,
mode: ClickOutsideMode.comparePixels,
});
const theme = useTheme();