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

Dialog closes and re-opens on blur when clicking* on a DropdownMenuItem that triggers it #3196

Open
BorisTheTripper opened this issue Oct 26, 2024 · 0 comments

Comments

@BorisTheTripper
Copy link

Bug report

Current Behavior

While the cursor is outside the dialog but still in the area of the trigger, blurring causes a reopen in two cases:

  • tapping the touchpad (should hopefully reproduce on a laptop that triggers a click event on touchpad tap)
  • clicking (on touchpad or mouse), holding until dialog is gone, and releasing
example.mp4

Expected behavior

The dialog shouldn't reopen.

Reproducible example

CodeSandbox Template or Repo

Additional context

The example is using shadcn components, but those don't seem to be overriding any radix defaults, so this should happen just the same w/ just radix primitives.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-dialog ^1.1.2
Radix Package(s) @radix-ui/react-dropdown-menu ^2.1.2
React n/a ^18.3.1
Operating System Windows 11
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

No branches or pull requests

1 participant