Skip to content

Commit

Permalink
Fixed modal clickoutside (#6624)
Browse files Browse the repository at this point in the history
Modal clickoutside was modified recently.

It was considering portaled component like dropdown outside, so
comparePixel mode for click outside is needed here.
  • Loading branch information
lucasbordeau authored Aug 14, 2024
1 parent 197bca5 commit 121794e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { ModalHotkeyScope } from '@/ui/layout/modal/components/types/ModalHotkeyScope';
import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
import { useListenClickOutsideV2 } from '@/ui/utilities/pointer-event/hooks/useListenClickOutsideV2';
import {
ClickOutsideMode,
useListenClickOutsideV2,
} from '@/ui/utilities/pointer-event/hooks/useListenClickOutsideV2';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import styled from '@emotion/styled';
import { motion } from 'framer-motion';
Expand Down Expand Up @@ -205,6 +208,7 @@ export const Modal = ({
onClose();
}
},
mode: ClickOutsideMode.comparePixels,
});

const stopEventPropagation = (e: React.MouseEvent) => {
Expand Down

0 comments on commit 121794e

Please sign in to comment.