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
transitionEnd
should not be applied when new animations caused the animation to stop
#2265
base: main
Are you sure you want to change the base?
Conversation
Can you add a test for this behaviour? It also looks like this would stop all of |
5f5fa89
to
4b771bf
Compare
4b771bf
to
9011c7d
Compare
@mattgperry Sure, added a test and fixed the logic to check if animations completed vs canceled here |
Any update on this PR? I believe I am experiencing the issue this PR would fix |
This fix would resolve #2317. Any update on merging this fix? |
Bumping this, any update Framer team? |
Hey @mattgperry what do you think needs to happen to get this PR merged? |
Would like to bump this as well. I came here from the earlier linked accordion chakra UI issue. What else needs to happen to get this merged? @mattgperry |
It seems like this isn't a problem in the newest versions of framer motion. I haven't noticed it in in the most recent couple versions. Can anyone else confirm? |
This PR aims to fix an issue where
transitionEnd
styles are applied after new animation starts and accidentally overrides the latest motion values.When new animation starts while animating,
MotionValue
stops the ongoing animation and immediately starts the new one. However astransitionEnd
waits for all animations to be resolved, sometransitionEnd
styles overrides new values.It seems to be introduced in #2025. Before it lands, calling
stop()
never resolves animation Promises, which are used to apply thetransitionEnd
styles at the end, so there was no race condition..Closes: chakra-ui/chakra-ui#7775