Open Bug 1909703 Opened 2 months ago Updated 17 days ago

Text Fragment highlight fails

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- unaffected
firefox130 --- disabled

People

(Reporter: phorea, Unassigned)

References

(Blocks 2 open bugs)

Details

Found in

  • Nightly 130.0a1;

Affected versions

  • Nightly 130.0a;

Tested platforms

  • Ubuntu 22;
  • macOS 14;
  • Windows 10;

Affected platforms

  • Ubuntu 22;
  • macOS 14;
  • Windows 10;

Preconditions

  • Have dom.text_fragments.enabled to TRUE

Steps to reproduce

  1. Access https://web.dev/articles/text-fragments#:~:text=Creating%20Text%20Fragment%20URLs
    https://www.youtube.com/watch?v=yhS9LnDoo_w#:~:text=The%20Chemical%20Brothers
  2. Access https://web.dev/articles/text-fragments#:~:text=username%3A%20%22%22%0A%7D%0A*/-,The%20fact%20though,-that%20I%20had (Copy to highlight generated from chrome)
  3. Access https://www.youtube.com/watch?v=yhS9LnDoo_w#:~:text=The%20Chemical%20Brothers

Expected result

  • Text fragments directive is applied, text highlighted and scrolled to

Actual result

  1. Text fragments directive scrolls the page to the fragment position but it doesn’t highlight
  2. Text fragment directive works: highlight and scroll
  3. Text fragments is not highlighted (unsure if scroll works for the example - since page it's already @ top) - seems that the fragment is executed before page loads

Regression range

  • Not a regression.

Additional notes

  • Same behavior in Chrome as well for 1 & 2.
  • 3rd example works properly in Chrome

Another case with PDF.js:
Step: Paste and navigate to the following link into the address bar: https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf#:~:text=Related%20documentation

Expected: The page is loaded, first instance of text Related documentation is highlighted. The page does not scrolls to the highlighted text fragment.

Actual: Nothing happens, text is only highlighted after pressing Enter again in urlbar.

(In reply to Petruta Horea [:phorea], Desktop Test Engineering (back on Sep 5th) from comment #0)

Found in

  • Nightly 130.0a1;

Affected versions

  • Nightly 130.0a;

Tested platforms

  • Ubuntu 22;
  • macOS 14;
  • Windows 10;

Affected platforms

  • Ubuntu 22;
  • macOS 14;
  • Windows 10;

Preconditions

  • Have dom.text_fragments.enabled to TRUE

Steps to reproduce

  1. Access https://web.dev/articles/text-fragments#:~:text=Creating%20Text%20Fragment%20URLs
    https://www.youtube.com/watch?v=yhS9LnDoo_w#:~:text=The%20Chemical%20Brothers

Here is my observation:
The right test fragment was originally correctly highlighted but then I saw the highlighted color disappear right after.

  1. Access https://web.dev/articles/text-fragments#:~:text=username%3A%20%22%22%0A%7D%0A*/-,The%20fact%20though,-that%20I%20had (Copy to highlight generated from chrome)

This is the directive which was generated for me, when I used "copy to highlight" in Chrome. And this works well in both Firefox and Chrome.
https://web.dev/articles/text-fragments#:~:text=username%3A%20%22%22,that%20I%20had

  1. Access https://www.youtube.com/watch?v=yhS9LnDoo_w#:~:text=The%20Chemical%20Brothers

This works for me now in Firefox.

Expected result

  • Text fragments directive is applied, text highlighted and scrolled to

Actual result

  1. Text fragments directive scrolls the page to the fragment position but it doesn’t highlight
  2. Text fragment directive works: highlight and scroll
  3. Text fragments is not highlighted (unsure if scroll works for the example - since page it's already @ top) - seems that the fragment is executed before page loads

Regression range

  • Not a regression.

Additional notes

  • Same behavior in Chrome as well for 1 & 2.
  • 3rd example works properly in Chrome
You need to log in before you can comment on or make changes to this bug.