You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to reproduce this in a simple environment but couldn't.
Describe your issue
On @headlessui/react v.1.7.13 and onwards when changing page and Dialog component unmounts on a page (closed state) focus is restored to some previously focused element (header menu item).
Problem is also fixed if I just add unmount={false} to the Transition component that our menu is using.
Hey! Is there any reproduction you can provide? I've tried to reproduce this and can't. The described situation itself seems strange to me which may be why:
The dialog is controlled by a button in a shared layout
The dialog itself is NOT in said shared layout but in a component on a particular page
You've opened the dialog, closed the dialog, and THEN changed pages? (this I'm not quite clear on)
This change of pages is what caused the dialog to unmount
As a result of this you see a focused button in the shared header / layout piece
Any insight you can give here would be much appreciated!
Going to close this issue for now since it's been a while and no reproduction repo has been attached since.
If you are still running into this issue then I would recommend to install the insiders version to see if this issue is still occurring for you since we did some improvements to the Transition component:
npm install @headlessui/react@insiders
If you are still running into this issue when you are using the insiders version, then I would suggest to open a new issue with a minimal reproduction repo attached so that we can take a look at what's going on. Once we have that information, then I'm more than happy to debug and see what's going on.
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v1.7.14
What browser are you using?
Chrome
Reproduction URL
Tried to reproduce this in a simple environment but couldn't.
Describe your issue
On @headlessui/react v.1.7.13 and onwards when changing page and Dialog component unmounts on a page (closed state) focus is restored to some previously focused element (header menu item).
Problem is also fixed if I just add
unmount={false}
to the Transition component that our menu is using.I think it is related to this PR: #2326
The text was updated successfully, but these errors were encountered: