mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
This commit is contained in:
parent
945508c895
commit
1247e03a33
@ -44,6 +44,17 @@ export const ModalContent = forwardRef(
|
||||
};
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
// Popover should be launched from within Modal but
|
||||
// the Popover containing element is a sibling to modal,
|
||||
// so this is required to ensure `onClose` isn't triggered
|
||||
// when clicking on a popover item
|
||||
if (
|
||||
isClosedOnOutsideClick &&
|
||||
(event.target as HTMLElement).closest('.mm-popover')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
isClosedOnOutsideClick &&
|
||||
modalDialogRef?.current &&
|
||||
|
Loading…
Reference in New Issue
Block a user