-
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
Modal overflow hidden issue #1764
Comments
Hey! Thank you for your bug report! The short answer is that we currently don't support simultaneous Modals unless they are nested. In your case, due to the Transition, there is a moment in time where both Modals will be in an open state. More information and some potential solutions can be found here: #1744 (comment) |
I would like to conclude I solved this with a short setTimeout between modals |
@philmetzger can u show a short snippet how you used setTimeout this way? I have exactly the same problem as you ;) |
Hey @hansens1927 unforunately as things go, things have changed, and i dont have that code anymore. But maybe I can help. So I think the issue is the modal has some exit animation. So you have to kind of delay the next modal until the animation is done and then show the next moda. Hope this helps. |
@philmetzger how would u delay it? |
depends on how you are showing and hiding modals. But maybe something like this:
Something like that I think |
@philmetzger Thank you for the fast replies, fixed it by doing what was here: #1698 |
So have a look at this issue: #881
Basically I have something similar (might not be the exact issue) but I was able to create a sandbox of the issue.
Check it out here: https://codesandbox.io/s/headless-ui-dialog-forked-ys0ktt?file=/src/App.tsx
The issue for me is when I have 2 modals and i want to go from 1 to the other.
Maybe there is something wrong with my implementation or a bug within headlessui?
The text was updated successfully, but these errors were encountered: