fix: Fixed issue where Super note would convert whole line into tag even after closing menu

This commit is contained in:
Aman Harwara
2022-12-23 15:03:18 +05:30
parent f3e147f4c9
commit 35b00737bf
6 changed files with 7 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ import { useEffect } from 'react'
type Options = {
popoverElement: HTMLElement | null
anchorElement: HTMLElement | null | undefined
togglePopover: () => void
togglePopover?: () => void
childPopovers: Set<string>
disabled?: boolean
}
@@ -34,7 +34,7 @@ export const usePopoverCloseOnClickOutside = ({
if (!isDescendantOfMenu && !isAnchorElement && !isDescendantOfChildPopover && !isDescendantOfChallengeModal) {
if (!disabled) {
togglePopover()
togglePopover?.()
}
}
}