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

Popover.Panel focus=true cause undesired open behavior when clicking multiple times on Popover.Button #1342

Closed
pawelkondraciuk opened this issue Apr 16, 2022 · 1 comment · Fixed by #1477
Assignees

Comments

@pawelkondraciuk
Copy link

pawelkondraciuk commented Apr 16, 2022

What package within Headless UI are you using?
@headlessui/react

What version of that package are you using?
1.5.0

What browser are you using?
Chrome

Reproduction URL
https://codesandbox.io/s/headlessui-popover-form-forked-cx4lmn

Describe your issue
✔️ When you try to click multiple times on the first red "Popover" button, popover panel will open -> close -> open -> close. That's ok
❌ When you try to do the same on the second "Popover with focus=true" button, popover panel will open -> open -> open -> open which is incorrect, should be the same as above. Clicking second time on a button should close popover (as you would click on overlay)

The only difference is focus={true} attribute added to second Popover.Panel

@RobinMalfait
Copy link
Collaborator

Hey! Thank you for your bug report!
Much appreciated! 🙏

This should be fixed by #1477, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders.

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 a pull request may close this issue.

2 participants