Scrolling to hash links is broken on Chrome
See original GitHub issueDescribe the bug
Clicking a link like https://kit.svelte.dev/docs/configuration#version should take you to that part of the page. It works in Firefox…
…but not Chrome:
Reproduction
Go to https://kit.svelte.dev/docs/configuration#version in Chrome
Logs
No response
System Info
System:
OS: macOS 12.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 69.61 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Browsers:
Chrome: 98.0.4758.109
Firefox: 97.0.1
Safari: 15.1
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.30
@sveltejs/adapter-static: next => 1.0.0-next.28
@sveltejs/kit: next => 1.0.0-next.291
svelte: ^3.46.0 => 3.46.4
Severity
annoyance
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:28 (19 by maintainers)
Top Results From Across the Web
Chrome based browsers - ScrollTo and anchor links not working
I have fixed my own problem whoop whoop! In the end I could not get the hash change or scrollto functions to work...
Read more >anchors not working correctly on web pages - Google Chrome ...
Anchor works when the anchor's clicked or when a page's opened with anchor in the URL but scrolling then refresh the page, it...
Read more >Google Chrome doesn't follow hash (#) pointers in the URL?
I understand that to navigate directly to a specific element on a page on uses a hash sign after the URL with the...
Read more >Chrome anchors are broken, Google has locked and is ...
The first time the page loads with an anchor in the url: `http://somesite.com/#gohere` it should load and go to that location on the...
Read more >Chrome exhibits weird scrolling jumping with anchor in the URL
Actual behavior: The page jumps back to the original scroll location and the click goes away. Even though the location bar text is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just wanted to tell you guys, you are doing great job, I recently tried svelte (kit) and felt like am home 🚀 ( no jsx, simplicity, chrome lighthouse is very happy …etc) I want to help with this but am still a noob, am learning a lot reading what you’re doing guys. Keep it up.
And good luck with this scrolling bug 😊
Hash links are working fine for me in Chrome Version 99.0.4844.84 on a Mac. Am I supposed to do something in particular to reproduce the issue?