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
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Then if you navigate from the first to the second, then press the back button in the browser, Sapper will not actually render the first page. It will just stay stuck on the second page.
I wrote a minimal repro using sapper-template. Steps to repro:
git clone https://github.com/nolanlawson/sapper-template.git \
--branch demo-sapper-sub-page-bug \
--depth 1 \
--single-branch
cd sapper-template
npm i
npm run dev
Then in a browser, open localhost:3000, click on "Account # 1", then click on "my sub-page", then click the back button.
Expected result: it navigates back.
Actual result: the URL changes, but it does not navigate back.
The text was updated successfully, but these errors were encountered:
It seems you can fix this by using [accountId]/index.html instead of [accountId].html, but it's a bit counter-intuitive that they would work differently.
The branch is using Sapper 0.22.10, but this looks to also be present in the latest 0.24.1.
It also looks like this is not specific to navigating back - if you click the 'Account # 1' in the header, while on the subpage, the same thing happens - the URL updates, the page does not.
When you were in /eli/code/code_civil and clicked on the nav to return
to /eli/code, the URL changed but not the content of the page (the
hydratation inside Sapper had a bug).
Bug: sveltejs/sapper#532
PR: sveltejs/sapper#539
Thanks to cudr@github.com!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you have a page structure like:
Then if you navigate from the first to the second, then press the back button in the browser, Sapper will not actually render the first page. It will just stay stuck on the second page.
I wrote a minimal repro using
sapper-template
. Steps to repro:git clone https://github.com/nolanlawson/sapper-template.git \ --branch demo-sapper-sub-page-bug \ --depth 1 \ --single-branch cd sapper-template npm i npm run dev
Then in a browser, open
localhost:3000
, click on "Account # 1", then click on "my sub-page", then click the back button.Expected result: it navigates back.
Actual result: the URL changes, but it does not navigate back.
The text was updated successfully, but these errors were encountered: