hackmdio / hackmdio/hackmd-io-issues
Browser always jumps back to last anchor link on any click in document (Safari only?)
- Dominant language
- No language data
- Stars
- 40
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
### Is this a hackmd.io issue?
- [X] Yes, the bug happens on https://hackmd.io
- [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd
### What's the problem
#### Current behaviour
When I jump in a document to a heading link (from the TOC or an anchor hash added to URL) and then scroll away from that position, it always jumps back to this anchor whenever I click anywhere else in the document.
This seems to happen only in Safari, on mobile and desktop. At least I tested it only in Chrome and Safari.
Provide steps to reproduce:
1. Open a HackMD document in Safari.
2. Click on an internal link, like from the table of contents, to jump there.
3. Scroll away from the link target.
4. Click anywhere like on the document background and it jumps back to the last anchor link.
#### Expected behaviour
Nothing should happen when I click in this case.
#### Environment
I use HackMD on:
**Desktop**
- OS: macOS
- Browser: Safari
- Browser Version: 14.1.2
**Mobile**
- Device: iPhone
- OS: iOS 15.5
- Browser: Safari
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.