You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set an out animation on a link in a nested layout page, which links to a page using the parent layout above. Click on it: instantly, the next page is loaded and displayed below the current one, while the out animation plays. After it's finished, the current page disappears and navigation is complete.
Note: I can't reproduce it here, but in my full project it doesn't even hide the current page at the end, and pages pile up one after the other on the bottom as I continue navigating back and forth, with no page ever disappearing.
Note: I use adapter-static, not sure it's relevant.
Expected result:
It seems to me the new page and its layout should be loaded only AFTER all out animations are complete.
I have not tried your sample code, but I regularly run into this problem with page transitions.
It usually can be solved by adding a delay to the in transition, that is at least as long as the outduration:
It would definitely be nice to have slightly more control over transitions (e.g. a staggered mode), though strictly speaking that's an issue for Svelte rather than SvelteKit (which knows nothing about transitions). It's something I hope to look at later this year. For now, will close this issue as there's nothing to change in SvelteKit itself.
(Though if you're able to reproduce "pages pile up one after the other on the bottom as I continue navigating back and forth, with no page ever disappearing", please do open a new issue!)
Describe the bug
Set an out animation on a link in a nested layout page, which links to a page using the parent layout above. Click on it: instantly, the next page is loaded and displayed below the current one, while the out animation plays. After it's finished, the current page disappears and navigation is complete.
Note: I can't reproduce it here, but in my full project it doesn't even hide the current page at the end, and pages pile up one after the other on the bottom as I continue navigating back and forth, with no page ever disappearing.
Note: I use adapter-static, not sure it's relevant.
Expected result:
It seems to me the new page and its layout should be loaded only AFTER all out animations are complete.
Reproduction
https://github.com/g012/svelte-anim-link
Just run the code from this repo, then click the "Go Test" button, then click either "Go Home" or "Link Home" from the new page. Observe the bug.
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response
The text was updated successfully, but these errors were encountered: