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

Ensure Popover doesn't crash when focus is going to window #2019

Merged
merged 2 commits into from Nov 16, 2022

Conversation

RobinMalfait
Copy link
Collaborator

This PR fixes an issue where the Popover component would crash if the window received focus. This happened becaues we are checking based on the event.target if it is still within the Popover.Panel or not using the node.contains(event.target) method. However, that doesn't support window as a value.

Fixes: #2018

@vercel
Copy link

vercel bot commented Nov 16, 2022

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

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Nov 16, 2022 at 2:08PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Nov 16, 2022 at 2:08PM (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
Development

Successfully merging this pull request may close these issues.

Window losing focus while Popover is open throws errors
1 participant