fix hover bug

This commit is contained in:
saml33 2024-03-17 23:36:56 +11:00
parent e6cada2569
commit 15979d4f39
1 changed files with 8 additions and 1 deletions

View File

@ -627,11 +627,18 @@ export const ExpandableMenuItem = ({
}
}, [isOverButton, isOverList])
useLayoutEffect(() => {
useEffect(() => {
setIsTouchInput(false)
setHasClicked(false)
}, [hasClicked])
// hack for weird bug where isOverList is true when it shouldn't be (only in account nav => click link in menu then overview tab and quickly hover account main menu icon)
useEffect(() => {
if (isOverButton && isOverList) {
setIsOverList(false)
}
}, [isOverButton, isOverList])
return collapsed ? (
<Popover className={`relative z-30 ${alignBottom ? '' : 'py-2 pl-4'}`}>
<Popover.Button