-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainersThis issue has not been triaged by maintainers
Description
🐛 Bug Report
Each markdown header has a targeted anchor link which corresponds to a URL.
i.e. http:///docs/mobile/doc1#header1
If you click on the headers in the right sidebar when the documentation is loaded, the page scrolls to the header that is the anchor link target as expected.
But, if you copy a link to one of the headers with a anchor # in it, and paste it into a new tab, the page does not scroll to the appropriate header on page load.
Have you read the Contributing Guidelines on issues?
yes
To Reproduce
- Create a new site using npx @docusaurus/init@next init test-site classic
yarn start- Open http://localhost:3000/docs/doc1#admonitions
Expected behavior
The page doc1 is opened and scrolled to the admonitions header
Actual Behavior
The page doc1 is opened but not scrolled to the admonitions header
Your Environment
- Docusaurus version used:
"@docusaurus/core": "^2.0.0-alpha.48",
"@docusaurus/preset-classic": "^2.0.0-alpha.48", - Chrome Version 80.0.3987.132
- Windows 10 Desktop
Reproducible Demo
This repo is an unmodified npx @docusaurus/init@next init test-site classic but including for completeness
https://github.com/Noah-Silvera/docusaurus-anchor-links-bug
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainersThis issue has not been triaged by maintainers