Transition cleanup happens too early if Kit is already running
See original GitHub issueDescribe the bug
On Chrome, if Svelte is already loaded on the page and refreshed (and sometimes routed to), any in: transition triggered by onMount will remove the animation before fully transitioned, causing the transition to jump to its final state.
Reproduction
https://jumpy-intros.vercel.app/some
https://github.com/iltimasd/jumpy-intros
Logs
No response
System Info
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
Memory: 52.05 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Browsers:
Chrome: 92.0.4515.107
Chrome Canary: 94.0.4590.2
Edge: 92.0.902.62
Firefox: 90.0
Safari: 13.0.4
npmPackages:
@sveltejs/adapter-vercel: next => 1.0.0-next.26
@sveltejs/kit: next => 1.0.0-next.139
svelte: ^3.34.0 => 3.41.0
Severity
annoyance
Additional Information
I have yet to find a workaround.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Transition Strategies for the Early Childhood Classroom
While transitions can be challenging, there are a number of things that you can do to make moving from one activity to another...
Read more >Animate layout changes using a transition - Android Developers
Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending ......
Read more >Transitioning objects using Amazon S3 Lifecycle
Amazon S3 doesn't transition objects within the first 30 days because newer objects are often accessed more frequently or deleted sooner than is...
Read more >Reducing Challenging Behaviors during Transitions - NAEYC
A routine cleanup song can be used when it is time to pick up toys. Set a timer to indicate that playtime is...
Read more >Optimize costs by automatically managing the data lifecycle
Use Azure Storage lifecycle management policies to create ... If a data set needs to be readable, do not set a policy to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m hitting an interesting wall trying to debug what’s going. I’ve decided to try adding some breakpoint in the transition cleanup portion of the bundled svelte. However if I add any breakpoints, the error goes away; presumably because the breakpoints are adding some sort of delay that allow the cleanup to happen on time. (edit: or! perhaps its the start time that’s actually wrong??)
Edit:
And I should add commenting cleanup() out solves the visual bug
I’m having this issue as well. I was able to get around it by wrapping the trigger in a
setTimeout()
call like such:The timeout is not super noticeable, but it’s certainly not ideal. I’ve played around with a few different durations and found that 500 works best for me.