Skip to content

Two issues with browser 'back' #1102

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

Open
andrewdonkin opened this issue May 15, 2025 · 0 comments
Open

Two issues with browser 'back' #1102

andrewdonkin opened this issue May 15, 2025 · 0 comments

Comments

@andrewdonkin
Copy link

Two things:

  • Navigating the table of contents does not add to browser history. You can click around all you want in there and when you go 'back', the browser will ignore everywhere you've been and take you to the URL you pasted into it to first load up the spec.

  • Following markdown links does not change the history location to where you are jumping from. For example if you start at the top of the document then scroll down (or followed a ToC entry, since they don't affect the history) then follow a markdown [text](url) link, then use the browser's back button, you'll be back at the top of the spec.

I find both of these a bit annoying since our spec is huge, and people tend to bounce around it. The workaround is to middle-click links, but that doesn't work on the table of contents.

I wish I could help, but JS isn't my thing. A bit of a google suggests that a history.pushstate() could address the first problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant