-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Multiple dialog Scroll Behavior Bug #1000
Comments
I have the same issue. Seems like a problem with the way the dialog component handles overflows for scroll locking. Given that the second dialog sees that the HTML tag is set to Can't figure out a permanent fix yet (as I think the code may require to be aware of chaining dialog boxes altogether), but what I did was set a |
Yeah this is ki
Thanks for your reply man, i appreciate it. |
Hey! Thank you for your bug report! This might be a timing issue bug because we restore the overflow: hidden when we close the Dialog but if the second Dialog is opened just a split second before the first one hides then you run into this issue. If this is still a problem, can you create a new issue with a minimal reproduction repo just to be sure that this is the actually issue you have? |
The same thing happens to me, and I don't open any dialog. All my dialogs are closed with the |
For anyone seeing this, it's definitely a timing issue with multiple dialogs. When the first dialog closes, it sets Here's my solution:
I've found 200ms consistently fixes the issue. |
What package within Headless UI are you using?
For example: @headlessui/react
What version of that package are you using?
^1.4.2
What browser are you using?
Chrome 96
Reproduction URL
Describe your issue
So iam creating multiple section with Transition and Dialog and when i change from 1st Dialog to 2nd Dialog, the odd is happening, the html tag is switched between the open dialog and the close dialog as you can see below
Is there anything wrong with my code or is this common bug ?
The text was updated successfully, but these errors were encountered: