Skip to content

Fix scroll top position for anchor links with new navigation

What does this MR do and why?

Fix scroll top position for anchor links with new navigation. Add .top-bar-fixed height adjustment to handleLocationHash and contentTop functions in common_utils.js.

Screenshots or screen recordings

Before After
CleanShot_2023-06-16_at_09.29.29 CleanShot_2023-06-16_at_09.31.43

How to set up and validate locally

  1. Enable new navigation
  2. Go to any Issue/MR/Epic or any other anchor link content
  3. Press a link
  4. Scroll position should cater for the fixed top-bar, comment/content should be fully visibile

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 #415491 (closed)

Merge request reports