-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Anchor link / fragment Link back button issue #26959
Comments
This seems to be a nontrivial issue. Does anyone know a work-around? Our visitors use this functionality intensively jumping between table of contents and content. We can't go productive with our Gatsby-site. |
Let me come back to this serious but still unresolved issue. I don't know, how other productive sites, if existent, handle this bug. Perhaps they live with the broken back button behavior mostly in conjunction with fragment links? One example for broken fragment links are the Gatsby API Docs itself, like https://www.gatsbyjs.com/docs/gatsby-link/ Using the right sidebar does not work at all. For our site I found a workaround. Let me know if I can help with something, perhaps with fixing some doc issues? Unfortunately I'm not experienced enough to go inside the reach/router and Link implementation. So I have to wait for someone else fixes this issue. Sorry for that. It seems like the issue is only present when mixing We do not use Markdown links Honestly. This workaround in content files (MDX) is critical. We have to convert about 5.000 pages and content authors have to "pollute" the content with Gatsby-Link-Components. I let You know how things are going. |
This issue is related and has been marked as closed #27431 |
I tried to reproduce the error again with the latest Gatsby version 2.24.80. All issues are gone. Important note! The work around above is not needed any more and would not work anymore! Stay with this simple rule:
Not sure when this issue was fixed nor who fixed it. Thanks a lot. |
Back button with anchor/fagmenmt links don't go back to last position. Tested with Firefox 80.0, Chrome 85.0.4183.83 and Safari 13.1.2 on macOS 10.15.6.
Reproduction steps (and many pages in the online docs):
gatsby new my-blog-starter https://github.com/gatsbyjs/gatsby-starter-blog
npm update
Insert this two lines somewhere in
content/blog/new-beginnings/index.md
[Go to (markdown link)](#gohere)
<a href="#gohere">Go to (a href link)</a>
Insert the anchor somewhere below
<h3 id="gohere">Here You are. Now press the backbutton.</h3>
Back Button will not work:
Won't return to top of page or previous position.
Back Button still won't work:
Back Button will work:
Originally posted by @don-esteban in #8019 (comment)
The text was updated successfully, but these errors were encountered: