Linked comment is not automatically scrolled to in issue comments list

Summary

When an issue loads and the URL uses #note_######, the specified note is highlighted in blue but not correctly scrolled to.

Reproduction

Steps to reproduce

Copy an comment link out of an issue, close the page, and navigate to the copied link in a new tab/window.

Example Project

This happens on gitlab-org/gitlab.

What is the current bug behavior?

The page loads and scroll to some section of comments list, and the highlighted blue comment is not displayed.

What is the expected correct behavior?

The highlighted comment should show in my browser window without me having to scroll anywhere.

Relevant logs and/or screenshots

The first scroll (fast) is the page automatically scrolling after a brief delay, which isn't great either. The slow scrolling after that is me looking for the linked comment.

bad-scroll-target

Possible fixes

I do not have any suggestions.

Edited by drew stachon