Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-20184

Link to line functionality using #linenumber and #lines-<linenumber> on the Bitbucket UI file viewer is not working as expected

XMLWordPrintable

      Issue Summary

      The link to line functionality is not working as expected on the Bitbucket UI file viewer

      • #linenumber highlights the line but the page is not scrolled to the line .
      • #lines-<linenumber> does not highlight the line and page is not scrolled to the line

      Steps to Reproduce

      1. Open the file on the UI file viewer
      2. Use the #linenumber on the browser URL. Mentioned line number is highlighted but the UI is not scrolled to the line number
      3. Use the #lines-linenumber on the browser URL.Mentioned line number is not getting and UI is also not scrolled to the line number

      Expected Results

      Bitbucket file viewer should be scrolled to the mentioned line number or range of lines and the line/lines should be highlighted

      Actual Results

      • With #<linenumber> the line number is highlighted on the file viewer, but the page is not scrolled to that line number.
      • #lines-<linenumber> does not highlight the line and the page is not be scrolled to the line number.

      Workaround

      After updating the line number after the # symbol, open that URL in a new tab.

        1. image-2025-09-08-10-47-03-487.png
          57 kB
          Jaya Mantri
        2. image-2025-09-08-10-47-08-967.png
          57 kB
          Jaya Mantri
        3. image-2025-09-08-10-47-56-639.png
          58 kB
          Jaya Mantri

              75fca8d6bc6b Hong Huynh
              57730852f533 Jaya Mantri
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: