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 the Transition stops once DOM Nodes are hidden #1500

Merged
merged 2 commits into from
May 25, 2022

Conversation

RobinMalfait
Copy link
Member

This PR will fix an issue where the onStop callback internally is never called if the DOM node
becomes hidden.

This happens when you use the Transition component in combination with the Dialog component.
When the Dialog becomes "hidden", then we unmount everything, however transitions don't seem to
run, end or cancel on hidden DOM nodes. This causes an issue where "hidden" DOM nodes had a pending
transition.

This pending transition prevented <Transition.Child> and <Transition> components higher up the
tree from unmounting. This in turn resulted in the Dialog not completely unmounting properly.

Fixes: #1417
Fixes: tailwindlabs/tailwindui-issues#1215

@vercel
Copy link

vercel bot commented May 25, 2022

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

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview May 25, 2022 at 0:51AM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview May 25, 2022 at 0:51AM (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
1 participant