Anchor links do not bring you to the relevent heading
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Describe the bug
In the text editor, when you hover over a heading (H1, H2, H3, etc), it offers a little hashtag icon to the left of it with a link to that anchor point in the document. For example (the #h-2026-06-09 bit in the URL below):
However, opening this link does not take you to that heading. It appears that the anchor is dropped from the URL during the process of loading the document.
To Reproduce
Steps to reproduce the behavior:
- Create a text file (markdown) with a heading.
- Copy the link to the heading with the appropriate hashtag appended to the URL.
- Visit that link in another browser tab.
- Observe that you are not taken to the heading, and the hashtag is dropped from the URL.
Expected behavior
I would expect that visiting that link would take me to the appropriate position in the document.
Server details:
- Nextcloud version: 32
- PHP Version: (using official Docker image)
- Database: PostgreSQL 14
Client details:
- OS: Debian
- Browser: Firefox
- Browser version: 128.4.0esr (64-bit)
- Device: desktop
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the text editor's heading-anchor and document-loading flow, then reproduce the issue with a Markdown heading and a copied hashtag link. Trace where the URL is processed when the document opens; done means the hash remains in the URL and the browser navigates to the matching heading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100