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

Allow clicks inside dialog panel when target is inside shadow root #2079

Merged
merged 3 commits into from
Dec 8, 2022

Conversation

thecrypticace
Copy link
Contributor

Fixes #2078

cc @RobinMalfait I remember you doing something with shadow roots at one point. I've done a bunch of testing and this looks like it works in all scenarios. Gonna merge this is all tests pass but figure I'd tag you for visibility.

It properly handles:

  • Open shadow roots
  • Closed shadow roots
  • Clicks from shadow roots inside the panel (keeps dialog open)
  • Clicks from shadow roots outside the panel (closes the dialog)

@vercel
Copy link

vercel bot commented Dec 8, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Dec 8, 2022 at 9:34PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Dec 8, 2022 at 9:34PM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant