Clicking on comment anchor link twice is broken in Firefox

Summary

When clicking on the same comment anchor link (the date/time of the comment) in an issue, Firefox does not nicely scrolls to the top of that comment.

Steps to reproduce

  1. Open Firefox.
  2. Open some issue with a lot of comments, e.g. https://gitlab.com/gitlab-org/gitlab-ce/issues/34028
  3. Click on the date/time of one of the comments, e.g. https://gitlab.com/gitlab-org/gitlab-ce/issues/34028#note_35201517
  4. Click that same date/time again

What is the current bug behavior?

The top part of the comment is hidden under the top nav var.

What is the expected correct behavior?

The top of the comment, nicely aligned below the top nav bar. Like it does the first time you click it (try with a different comment in the same issue)

Relevant logs and/or screenshots

image

Output of checks

This bug happens on GitLab.com