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
The navigation store value isn't set to null after successful navigation to a page. The problem occurs only when navigation to a page is aborted by navigating to another page.
I think this is a bug because according to the docs the navigating should be set null after successful navigation (and all other navigations are aborted).
Reproduction
/second is an artificially slowed-down page to make reproduction easier.
Click on the /second link
Before /second loads, click on /third
You will see that conditionally rendered HTML from Something.svelte stay rendered.
The problem is conditions on lines 921 and 923. As condition 923 blocks navigating reset because there's a stall navigating (navigation == 1 in the repro, specifically the /second route navigating) and condition 921 blocks the late-returned await update from /second to clean-up.
This seems like a not-so-hard problem to solve. However, I'm not brave enough to make a PR, with a little bit of guidance I'll be glad to help with this out (if needed) 😊
The text was updated successfully, but these errors were encountered:
susickypavel
changed the title
navigating store isn't set to null when aborted
Navigating store isn't set to null when navigating is aborted
Apr 19, 2022
I'm iterating over ideas on how to solve this issue.
Is the navigating variable (client.js:496) along with the condition on 923 needed? It seems to me that current_navigating_token and navigating_token should have the same effect.
Describe the bug
The navigation store value isn't set to null after successful navigation to a page. The problem occurs only when navigation to a page is aborted by navigating to another page.
I think this is a bug because according to the docs the navigating should be set null after successful navigation (and all other navigations are aborted).
Reproduction
/second
is an artificially slowed-down page to make reproduction easier./second
link/second
loads, click on/third
You will see that conditionally rendered HTML from
Something.svelte
stay rendered.https://stackblitz.com/edit/sveltejs-kit-template-default-kajrov?file=src/routes/index.svelte
Logs
No response
System Info
Severity
annoyance
Additional Information
I traced the problem to be in this file.
The problem is conditions on lines 921 and 923. As condition 923 blocks navigating reset because there's a stall navigating (navigation == 1 in the repro, specifically the
/second
route navigating) and condition 921 blocks the late-returnedawait update
from/second
to clean-up.This seems like a not-so-hard problem to solve. However, I'm not brave enough to make a PR, with a little bit of guidance I'll be glad to help with this out (if needed) 😊
The text was updated successfully, but these errors were encountered: