Code line link on folded diff not working

Summary

A link to a line of code within a folded MR will not redirect to the line in particular but to the diff page in general.

Steps to reproduce

  1. Choose a diff which has folded code.
  2. Unfold the code and select a line number
  3. Copy the url from the browser
  4. Paste it in another tab
  5. When the page loads it will redirect us to the page

Expected behavior

When loading a line link from a folded diff I expect to view the exact line.

Actual behavior

When loading a line link from a folded diff I get redirected to the top of the diff page

Relevant logs and/or screenshots

This has been reproduced in GitLab.com


/cc @jschatz1

Assignee Loading
Time tracking Loading