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

Transition with unmount #1557

Closed
ARkrOSClou opened this issue Jun 7, 2022 · 14 comments · Fixed by #1803 or #1811
Closed

Transition with unmount #1557

ARkrOSClou opened this issue Jun 7, 2022 · 14 comments · Fixed by #1803 or #1811

Comments

@ARkrOSClou
Copy link

ARkrOSClou commented Jun 7, 2022

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

v1.6.4

What browser are you using?

Chrome

Reproduction URL

sandbox: codesandbox.io/s/objective-noether-9qi5ri?file=/src/App.js

Describe your issue

Transition component with unmount prop does not play animation when called from a completely inactive state as expected, but if another animation is played in parallel - it works fine

https://www.screencast.com/t/9R5UjHcJaK7K

@ellemedit
Copy link

ellemedit commented Jul 13, 2022

In addition, it seems that doesn't fire afterLeave event handler.

@stevebauman
Copy link

stevebauman commented Jul 15, 2022

I've stayed locked to v1.5.0 which seems to be the most stable of all the versions. All versions there-after seem to have regression bugs 😢

This bug occurs in v1.6.7 as well.

@radiylon
Copy link

radiylon commented Aug 5, 2022

@ARkrOSClou @beingbook maybe this is the fix incoming #1118

@RobinMalfait
Copy link
Collaborator

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

You can already try it using npm install @headlessui/react@insiders.

@ARkrOSClou
Copy link
Author

ARkrOSClou commented Sep 2, 2022

@RobinMalfait, i was update test build and now it looks the same actually

@RobinMalfait
Copy link
Collaborator

@ARkrOSClou wait so that's what you would expect right or am I still missing something since it still has the word "broken" in there? 😅

@ARkrOSClou
Copy link
Author

ARkrOSClou commented Sep 2, 2022

@RobinMalfait https://www.screencast.com/t/0lcK5zXlcpcP
it still instantly jumps, no easing

@RobinMalfait
Copy link
Collaborator

Can you provide me some more information about which Chrome version you are using and your OS or any information that I could use to try and debug this?

This is what I see on Chrome (Version 104.0.5112.101 (Official Build) (arm64)) and Safari (Version 15.6.1 (17613.3.9.1.16))

  • Top is Chrome
  • Bottom is Safari
Screen.Recording.2022-09-02.at.12.24.54.mov

@RobinMalfait
Copy link
Collaborator

After refreshing my browser a lot of times, I could reproduce it about 1-2% of the time in Chrome and was still very random. Could not reproduce it in Safari at all, I could reproduce it in Firefox pretty consistently.

But I think I found a solution here #1811

@ARkrOSClou can you install the latest insiders version and see if that works on your machine now?

@ARkrOSClou
Copy link
Author

ARkrOSClou commented Sep 2, 2022

@RobinMalfait thanks, after update package all works fine, probably in previous insiders version 0.0.0-insiders.a98e55c there was not the necessary fix yet

@RobinMalfait
Copy link
Collaborator

Perfect, I'm really happy to read this. In a previous version we did some important updates to Transition, but this particular bug was related to the unmount={false} directly.

Glad it's fixed now! Thank you for testing.

@alexmillman23
Copy link

I'm still having this issue on 1.7.13 (Vue.js).

@Tkaixiang
Copy link

Still having this issue as of 1.7.18 (React)

@cmhampton-meridian
Copy link

Still having this issue as of 1.7.18 (React)

I can confirm the same issue in 1.7.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants