Skip to content

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Sep 16, 2025

Fixes these scenarios (and possibly more given it's general):

  • Context Menu: Right click (without a pointerup release), move to a submenu, release on an empty area; root closes but submenu doesn't, so it lingers around until the root unmounts without fading out correctly (only visible when there are exit transitions, but also doesn't work with keepMounted prop). In JUI it happens while releasing over an item as well
  • Menubar: ArrowRight inside a submenu to land on a new menuitem trigger in the menubar; same issue as above

@atomiks atomiks added component: menu Changes related to the menu component. component: context menu Changes related to the context menu component. component: menubar Changes related to the menubar component. labels Sep 16, 2025
@atomiks atomiks changed the title [context menu][menubar] Ensure submenus close when root closes [context menu][menubar] Ensure submenus close when parents close Sep 16, 2025
@atomiks atomiks added the type: bug It doesn't behave as expected. label Sep 16, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 16, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2768
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2768

commit: 674f8c4

@mui-bot
Copy link

mui-bot commented Sep 16, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+242B(+0.07%) 🔺+48B(+0.04%)

Details of bundle changes

@netlify
Copy link

netlify bot commented Sep 16, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 674f8c4
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68c8c768af09e800081b9c41
😎 Deploy Preview https://deploy-preview-2768--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks atomiks force-pushed the fix/menu-submenu-close branch from 6c8af38 to 674f8c4 Compare September 16, 2025 02:11
@atomiks atomiks marked this pull request as ready for review September 16, 2025 07:13
@mnajdova
Copy link
Member

I can't reproduce this on master. Can you share a reproduction and maybe a recording of what's happening?

@atomiks
Copy link
Contributor Author

atomiks commented Sep 19, 2025

@mnajdova Menubar needs exit transitions on the menus: https://github.com/mui/joy-ui/pull/319#issuecomment-3282554478

Context Menu one is reproducible on JUI Context Menu docs

@atomiks atomiks merged commit 72e691b into mui:master Sep 23, 2025
20 checks passed
@atomiks atomiks deleted the fix/menu-submenu-close branch September 23, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: context menu Changes related to the context menu component. component: menu Changes related to the menu component. component: menubar Changes related to the menubar component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants