Open Bug 1764964 Opened 3 years ago Updated 3 years ago

Find in page doesn't work on line numbers in Chrome

Categories

(Webtools :: Searchfox, defect)

defect

Tracking

(Not tracked)

People

(Reporter: mcomella, Unassigned)

Details

STR

  1. Using Google Chrome
  2. Open a page like https://searchfox.org/mozilla-central/rev/d34f9713ae128a3138c2b70d8041a535f1049d19/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoJavaSampler.java#787
  3. cmd+f to open find in page
  4. Type in a line number like 787

Expected

Line number is highlighted and page is scrolled

Actual

No line number is found and the page doesn't scroll. Searching for code doesn't have this problem.

When combined with bug 1764963, this makes it difficult to navigate searchfox results quickly in Chrome.

I can't reproduce this issue in Firefox.

I believe we do the same thing github does for their code listings; namely synthetic content via:

.line-number::before {
	content: attr(data-line-number);
}

Does Chrome let you search for line-numbers on github source listings like on this page link from the other bug you just filed?

Flags: needinfo?(michael.l.comella)

Does Chrome let you search for line-numbers on github source listings like on this page link from the other bug you just filed?

It doesn't – like on searchfox, it can't find the page numbers.

Flags: needinfo?(michael.l.comella)
Summary: Find in page doesn't work on page numbers in Chrome → Find in page doesn't work on line numbers in Chrome
You need to log in before you can comment on or make changes to this bug.