fix: Fixed issue where converting a note to Super from the note options menu would not work
This commit is contained in:
@@ -30,9 +30,9 @@ 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 isDescendantOfChallengeModal = !!target.closest('.challenge-modal')
|
||||
const isDescendantOfModal = !!target.closest('[aria-modal="true"]')
|
||||
|
||||
if (!isDescendantOfMenu && !isAnchorElement && !isDescendantOfChildPopover && !isDescendantOfChallengeModal) {
|
||||
if (!isDescendantOfMenu && !isAnchorElement && !isDescendantOfChildPopover && !isDescendantOfModal) {
|
||||
if (!disabled) {
|
||||
togglePopover?.()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user