fix(react-menu-grid-preview): submenus stay open when moving mouse from trigger to popover#35862
Merged
bsunderhus merged 3 commits intomicrosoft:masterfrom Mar 11, 2026
Merged
Conversation
…om trigger to popover MenuGrid now provides MenuListContext, making nested Menu components detect themselves as submenus (openOnHover=true). This ensures MenuPopover.onMouseEnter clears any pending close timeout when the user moves the mouse from a submenu trigger into the submenu popover. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
jurokapsiar
approved these changes
Mar 11, 2026
…ing safeZone pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tudorpopams
pushed a commit
to tudorpopams/fluentui
that referenced
this pull request
Apr 14, 2026
…om trigger to popover (microsoft#35862) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
MenuGriddid not provideMenuListContext, so nestedMenucomponents returnedisSubmenu = falsefromuseIsSubmenu(). This meantopenOnHover = false, which causedMenuPopover.onMouseEnterto never callsetOpen(true)to clear the pending 500ms close timeout triggered byMENU_ENTER_EVENTas the mouse crossed the outerMenuPopover.MenuGridnow providesMenuListContextviaMenuListProvider, making it a proper semantic alternative toMenuList. NestedMenucomponents now detectisSubmenu = true→openOnHover = true→ hover-to-keep-open works correctly.menuItemSelectorconstant in the test file.Test plan
yarn nx run react-menu-grid-preview:e2e— all 8 tests passMenuGridWithSubmenustory, hover a "More actions" button, then slowly move the mouse into the submenu popover — submenu should remain open🤖 Generated with Claude Code