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
strange behavior when switching fast #138
Comments
Or maybe it's possible to prevent new animations from starting before the previous one has completed? |
It is possible to do that, but we made the decision early on that it is better to respond to the user interaction by jumping to the new state immediately. Clicking and not having instant feedback was worse (imho) than a bit of jank. Not sure what an elegant solution should be in this case |
@justin-schroeder First solution that came to mind: |
If you toggle the animation fairly quickly, before it has finished, the animation behavior becomes weird. Some animations are cancelled. Part of the animations tries to play, but often gets incorrect coordinate data (as far as I understand) and it looks unsuccessful.
I got a problem in a spoiler component that has the ability to change its state quite quickly. The closest official example is the accordion.
The problem is easy to observe with a large duration value.
Screen.Recording.2023-04-25.at.15.22.24.mov
If it's an API limitation and the animation can't be continued in the middle, perhaps it would be worth canceling the current animation completely before starting a new one?
The text was updated successfully, but these errors were encountered: