line click in code search doesn't open the file at the specified line

Summary

When we search code, in the result, we can click on the line number. This used to open the file and move (using anchor) us to the right line. Now, it basically does nothing. It only move the line we clicked, still in the search view, at the top of the screen.

Steps to reproduce

  1. Open a repository, ex: https://gitlab.com/bornxbackwards/my-awesome-project
  2. Search for "test"
  3. In the result, click on the line number of a result. See that it doesn't open the file.

Example Project

See steps to reproduce.

What is the current bug behavior?

It does not open the file at the right line but only move the whole search up in the browser.

What is the expected correct behavior?

It should open the file (ex: https://gitlab.com/bornxbackwards/my-awesome-project/blob/master/test) with anchor at the line number we just clicked.

Relevant logs and/or screenshots

Nothing Relevant.

Output of checks

It happens in our local instance (currently the old GitLab Community Edition 11.1.4 gitlab-ce@63daf37ad326bb4c4e74ebee8b8e2be7878b298f) And it also happen right now on gitlab.com (currently GitLab Enterprise Edition 11.2.3-ee gitlab-ce@aadca994104734b14ca18e6c10d5e3c54a435b4a)

Results of GitLab environment info

Pretty sure it's not needed for this specific bug. If needed, let me know. Also happens on gitlab.com right now.

Results of GitLab application Check

Pretty sure it's not needed for this specific bug. If needed, let me know. Also happens on gitlab.com right now.

Possible fixes

I don't know.

Edited Jun 24, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading