Jump link anchors dont work
See original GitHub issueBug report
Describe the bug
When clicking an anchor tag in a different page with a jump to id tag, it raises an error and doesnt go.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
<a className='nav-link' href='https://github.com/zeit/next.js/#documentation' > Docs </a>
Expected behavior
should redirect to github and scroll to documentation tag
Screenshots
System information
- Browser (if applies): Chrome
- Nextjs version: 9.1.6
Additional context
I’ve tried this in another project without nextjs and it works fine i also tried in a random place like
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:38 (1 by maintainers)
Top Results From Across the Web
HTML Anchor Jump Doesn't Work - Stack Overflow
when i setup a link to jump to a certain div it doesn't work. For example when i say <a href="#Section1>Section 1</a> and...
Read more >Anchor Links/Jump Links – Just Going Too Far | WordPress.org
Hi, I used the block editor feature to create an anchor link to jump to a specific headline, and it works, but the...
Read more >Anchor Links to another page not working in Chrome
On that page I have a link to jump to the second section. Within that page the link works fine. If I use...
Read more >Anchor link to different page not working (jumping back to top ...
For some reason every time I do a fresh reload of the page, it does go to the anchor on load but only...
Read more >How to Add an Anchor Link to Jump to a Specific Part of a Page
An anchor link is a link, which allows the users to flow through a website page. It helps to scroll and skim-read easily....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
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

Here is how i adapted the above because it doesn’t work on mobile for me:
Have this exact same issue.
Why is this not a priority for the Nextjs team? This is breaking a pretty common web pattern for any sites built on top of Nextjs.