-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Animate breaks when used along with fly transition #6001
Comments
I think a simple solution to solve this problem just change the duration of transition and animate. I tried duration to 600ms or less than 600ms and it's work... |
Yup, that works in this case. However, if you go to https://shreyas44.vercel.app and scroll down to the My Projects section and keep clicking the next button, the same thing happens. And in that case the duration is set to 400ms. |
I think fly has to have a significantly shorter duration than flip. When they are the same duration, there is a race condition somewhere and the animation isn't calling the function to remove the |
@kindoflew that does make sense. One thing I forgot to mention is that, this problem doesn't occur when the transition is only set to I tried a workaround where I use a |
Probably also related to #4732. The docs on animate do say that about being the immediate child, I'm assuming so Svelte can know specifically which items to move to new positions before animating. The solution for your portfolio might be to forgo using flip and instead use a carousel component like svelte-carousel or roll your own. |
Seems to happen when using |
Duplicate #4910 |
I wonder if this is related to my StackOverflow post: how to animate:flip with in/out:fade? |
Still having problems with this :(. Repro: https://svelte.dev/repl/4d641551906e4b82a893918bb43fd6d3?version=4.2.12 Edit: Just fixed it thanks to a solution here: #4910 (comment) |
Fixed in Svelte 5 |
Describe the bug
The
flip
animation andfly
transition break when used together, not sure which one is causing the other to break however.Logs
Console is clear
To Reproduce
REPL: https://svelte.dev/repl/46298c2514ef4215b06ddab7c7bc44e0?version=3.32.3
In the REPL, repeatedly click on
![Screen Shot 2021-02-18 at 10 50 27 PM](https://user-images.githubusercontent.com/46835608/108396014-6307ec80-723c-11eb-8a31-8eb3dcf14632.png)
next
(fast) and this happensExpected behavior
![Screen Shot 2021-02-18 at 10 50 33 PM](https://user-images.githubusercontent.com/46835608/108396088-774be980-723c-11eb-851f-8898b7e95f8a.png)
With regards to the above screenshot, it's supposed to look something like this
Information about your Svelte project:
Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10): Chrome 88.0.4324.96
Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc): MacOS 11.2.1
Svelte version (Please check you can reproduce the issue with the latest release!): 3.32.3
Whether your project uses Webpack or Rollup: Rollup
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?
Annoying and breaks the page
Additional context
If required, I could share a more real world reproduction
The text was updated successfully, but these errors were encountered: