mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Disable the menu close on click on small screens, need to research this more
This commit is contained in:
parent
1316a4d554
commit
742772fdb7
1 changed files with 11 additions and 6 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue