-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
scroll on browser back button click #3663
Conversation
|
✔️ Deploy Preview for kit-demo canceled. 🔨 Explore the source changes: 119203e 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/61f983daf534600007dac983 |
Can you explain how you came to this solution and why you are making this change? |
@benmccann, when I tried to navigate to a hash and come back using back button, it didn't worked at first. but, at the second time, it worked. but, without scrolling. so, I thought that this problem is due to history. Then I saw this issue - #3636 and then found that, the history is being recorded twice. Then, I looked into the code and found that, when using |
@benmccann I have tested the approach. and it seems working. please let me know if there's any other way to resolve the issue. |
I think there's a bigger issue with the behavour now, that somewhere in the code Maybe this was already discussed before and I missed it. But historically when we call the (I haven't looked deep into the behaviour yet) |
Yes, I agree this is not the right solution, so I'm going to go ahead and close this. If you can point out on the issues where the two calls happen that may help us in designing a better solution |
solves - #3621 and maybe #3636
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0Video Test:
Issue-.3621.mov