-
-
Notifications
You must be signed in to change notification settings - Fork 106
Pages get stacked when using svelte transition #241
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
Comments
Can you please share some code to reproduce the issue? I'm afraid, without it will be impossible to debug this. |
Okay, found a second condition: It needs to also use and modify a store between pages. And here is a REPL to replicate: https://svelte.dev/repl/2897c6f2cee7479fa41416e93ce75970?version=3.43.0 |
This is very helfpul. However, looks like this is not an issue with the router itself, but an issue upstream with the Svelte compiler. I was able to replicate the issue here without using the router: https://svelte.dev/repl/193b233e492c4c75b0d0fd07604c7165?version=3.43.0 In particular, this only happens when you set a component with Would you mind opening an issue with the Svelte team directly? Hopefully what I found above can help them too :) |
Opened a bug with the svelte team: sveltejs/svelte#6779 |
Thank you! I also just noticed that my use of |
I had exactly the same issue using nested routing, store and transition - navigation between categories /#/listings/active or /#/listings/expired was fine, but navigating to main page /#/listings and back to category would result in stacked pages. My workaround to this issue was to remove nested routing (explained here: #20 (comment)). |
Try replacing your a tag with button and use the push method. |
The button method didn't work for me, however I found this sveltejs/svelte#6226 (comment) that provided a workable solution
|
Hi,
I have a Svelte app using the svelte-spa-router. The main page consists of an grid of bootstrap cards which are instantiated with svelte transition:slide. If I switch from the main page to another page the main page often - but not always - does not disappear. Instead the new page is rendered below the existing page. This can even happen multiple times stacking pages on pages.
If I remove the transition from the cards all works fine.
I tried to replicate this with a simple example to no avail so far. So sorry for the
The text was updated successfully, but these errors were encountered: