Disable the menu close on click on small screens, need to research this more

This commit is contained in:
Jackson Harper
2024-08-13 11:23:34 +08:00
parent 1316a4d554
commit 742772fdb7

View File

@ -67,12 +67,12 @@ export function NavigationMenu(props: NavigationMenuProps): JSX.Element {
}}
onClick={(event) => {
// on small screens we want to dismiss the menu after click
if (window.innerWidth <= 768) {
setDismissed(true)
setTimeout(() => {
props.setShowMenu(false)
}, 100)
}
// if (window.innerWidth <= 768) {
// setDismissed(true)
// setTimeout(() => {
// props.setShowMenu(false)
// }, 100)
// }
event.stopPropagation()
}}
>
@ -183,6 +183,7 @@ const LibraryNav = (props: NavigationMenuProps): JSX.Element => {
onClick={(event) => {
setMoreFolderSectionOpen(!moreFolderSectionOpen)
event.preventDefault()
event.stopPropagation()
}}
>
<HStack
@ -313,6 +314,10 @@ const Shortcuts = (props: NavigationMenuProps): JSX.Element => {
outline: 'none',
},
}}
onClick={(event) => {
event.preventDefault()
event.stopPropagation()
}}
>
<ShortcutsTree treeRef={treeRef} />
</Box>