Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub-menus are too eager to close #2853

Closed
emilk opened this issue Mar 29, 2023 · 0 comments · Fixed by #4166
Closed

Sub-menus are too eager to close #2853

emilk opened this issue Mar 29, 2023 · 0 comments · Fixed by #4166
Labels
bug Something is broken

Comments

@emilk
Copy link
Owner

emilk commented Mar 29, 2023

I think we should consider re-defining what keeps a sub-menu open.

The current behavior is "keep sub-menu open while hovering it or any child". This leads to sub-menus closing very easily when the mouse strays outside their active area.

I think we should change this to "remain open until another sub-menu-button is hovered, unless is is a descendant UI". That's how most menu systems work.

Se the problem here:

menus-close-too-quickly

@emilk emilk added the bug Something is broken label Mar 29, 2023
emilk added a commit that referenced this issue Jan 7, 2024
This tiny change removes the trigger for a submenu to close if the mouse
is no longer hovering over it or one of its children. Now, the menu
stays open until a different menu item is selected. This aims to address
<#2853>.

I suspected that a new trigger would need to be implemented so that
multiple menu items don't remain open simultaneously, but after some
testing, this does not appear to occur.

This change leaves `MenuState::hovering_current_submenu` and
`MenuState::close_submenu` as dead code in case they might be useful
later.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
emilk added a commit that referenced this issue Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant