When I am reading an article and click on a link and than go back (back button in browser) I would expect to land at the same reading position as I was before.
On plain HTML it works in browsers, this behaviour is probably caused by the site generator.
Go to https://nodejs.dev/ and scroll to heading An Example Node.js Application.
Click on link standard library.
Hit back button in browser.
I should see the heading An Example Node.js Application.
I see top of the article.
Getting the expected result require that you use the hyperlink to the header (just beside the heading to the left).
Not clicking the hyperlink results to the unexpected result
Yes, but that is not the point. You would never click that link unless you want to share the position with someone or save it for yourself, but that is another topic.
I tried experimenting with another site (stackoverflow) and expected behavior (going back to exactly where you were on the page) was true.
I think this is a valid issue now.
Hello! I'll try taking this one.
@seirina-of-js 馃憤馃徑
Hi @seirina-of-js have you been able to work on this issue?
Hi @benhalverson, I would like to take a look into this, but not sure how we want to track the scroll position. I was thinking of adding a header id as a hash in the URL as the user scroll or just keep/save the scroll position on local storage when a user scrolls.
Related: #236 #214
Hey @giankotarola it's lovely that you want to take a stab on that :] See here: Intersection Observer API . It's also used in the project somewhere. If you have further questions swing by the slack channel :]