Skip to content

fix(menu): defer outside pointer interactions on menu content#3976

Open
fayonation wants to merge 2 commits into
radix-ui:mainfrom
fayonation:fix/dropdown-in-dialog-dismiss-3971
Open

fix(menu): defer outside pointer interactions on menu content#3976
fayonation wants to merge 2 commits into
radix-ui:mainfrom
fayonation:fix/dropdown-in-dialog-dismiss-3971

Conversation

@fayonation

Copy link
Copy Markdown

Summary

  • Adds deferPointerDownOutside to menu DismissableLayer, matching Popover and Dialog behavior
  • Adds a regression test and Storybook Dropdown Within Dialog reproduction story

Fixes #3971

Problem

Clicking outside a DropdownMenu that is open inside a Dialog dismisses both the menu and the dialog, because the outside pointer event propagates to the dialog layer.

Test plan

  • pnpm vitest run packages/react/dismissable-layer/src/dismissable-layer.test.tsx
  • Storybook Dropdown Within Dialog — clicking inside the dialog but outside the menu closes only the menu
  • CI passes on PR

Made with Cursor

fayonation and others added 2 commits June 23, 2026 20:34
Align menu dismissal timing with dialog by deferring pointer down
outside handling. Prevents closing a dialog when dismissing a nested
dropdown menu. Fixes radix-ui#3971.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 44faf6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@radix-ui/react-menu Patch
@radix-ui/react-dropdown-menu Patch
@radix-ui/react-context-menu Patch
@radix-ui/react-menubar Patch
radix-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking outside a DropdownMenu inside a Dialog also dismisses the dialog

1 participant