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

Clicking on the Select.Trigger inside a shadow root causes the dropdown to reopen while the dropdown is visible #445

Open
ivancuric opened this issue Jul 17, 2024 · 1 comment

Comments

@ivancuric
Copy link

ivancuric commented Jul 17, 2024

When a Select.Trigger is inside a Shadow root (open or closed), clicking the trigger will close and quickly reopen the dropdown.

Not sure how the popper.js / floating UI works, but might be caused by aria attributes not working across shadow root boundaries: https://nolanlawson.com/2022/11/28/shadow-dom-and-accessibility-the-trouble-with-aria/

Repro:
https://stackblitz.com/edit/github-3ajpxj-zm9mjo?file=src%2FApp.tsx

This behaviour can be reproduced even without a Select.Portal, or by mounting the portal inside the shadow dom.

Possible related issue: floating-ui/floating-ui#2420

@ivancuric
Copy link
Author

Could possibly be solved with something like https://ark-ui.com/react/docs/providers/environment

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