chore: fix signin menu closing on incorrect mfa

This commit is contained in:
Aman Harwara
2023-06-26 19:56:00 +05:30
parent c378288d6e
commit dffeb7e710

View File

@@ -25,8 +25,8 @@ export const usePopoverCloseOnClickOutside = ({
const isAnchorElement = anchorElement ? anchorElement === event.target || anchorElement.contains(target) : false
const closestPopoverId = target.closest('[data-popover]')?.getAttribute('data-popover')
const isDescendantOfChildPopover = closestPopoverId && childPopovers.has(closestPopoverId)
const isPopoverInModal = popoverElement?.closest('[data-dialog]')
const isDescendantOfModal = isPopoverInModal ? false : !!target.closest('[data-dialog]')
const isPopoverInModal = popoverElement?.closest('[data-dialog], .sk-modal')
const isDescendantOfModal = isPopoverInModal ? false : !!target.closest('[data-dialog], .sk-modal')
if (
!isDescendantOfMenu &&