You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rather than hack the Menu/Menu Item relationship to enforce open/close rules on a Menu with multiple submenus, add a root concept to the overlay stack that prevents multiple overlays from the same root, even if they have different triggers.
prevent leaving things open
prevent passing focus back to the "root"
reduce code needed to manage submenus
doesn't have a test for duplicate submenus being open because while I'm "certain ™️" that the issue comes from the way setCloseSelfAsSubmenu and setCloseOpenSubmenu were being used, I could never isolate a reproduction case to base a new test on
needs a test for closing super decedent submenus when changing two+ levels up
Mouse around in an attempt to break it and have a submenu not open or have more than one submenu for the same menu open or have sub-submenus not close, etc.
Rejoice.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Is it intended behavior to have the user click multiple times to close a nested menu? Checking since that's not typically how these sorts of menus behave:
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Rather than hack the Menu/Menu Item relationship to enforce open/close rules on a Menu with multiple submenus, add a
root
concept to the overlay stack that prevents multiple overlays from the same root, even if they have different triggers.setCloseSelfAsSubmenu
andsetCloseOpenSubmenu
were being used, I could never isolate a reproduction case to base a new test onRelated issue(s)
Motivation and context
Things should "just work" 😉
How has this been tested?
Types of changes
Checklist