Skip to content

Fix auto-scrolling to hash on Markdown files

Jacques Erasmus requested to merge 417496-fix-markdown-anchor-scrolling into master

What does this MR do and why?

Fixes scrolling to the URL hash when viewing Markdown files

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
No auto-scrolling to the heading Auto-scrolls to the heading
Screenshot_2023-07-24_at_11.24.18 Screenshot_2023-07-24_at_11.24.35

How to set up and validate locally

  1. Open a large Markdown file sample.md
  2. Select the anchor in one of the headings
  3. Refresh the page
  4. The page should auto-scroll to the selected heading

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #417496 (closed)

Edited by Jacques Erasmus

Merge request reports