Open Bug 1759709 Opened 3 years ago Updated 3 years ago

Text selection is extended when searching for copied text in pdf

Categories

(Firefox :: PDF Viewer, defect)

defect

Tracking

()

Tracking Status
firefox-esr91 --- affected
firefox98 --- affected
firefox99 --- affected
firefox100 --- affected

People

(Reporter: pmagyari, Unassigned)

Details

Attachments

(1 file)

Attached image Screenshot 2022-03-15 at 16.29.42.png (deleted) —

Steps to reproduce:

  1. Open Firefox
  2. Navigate to https://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf
  3. Open the find-in-text search bar (ctrl+f/ cmd+f)
  4. Highlight and copy the following phrase from the first sentence of the text "all of the fonts"
  5. Paste it into the search bar

Expected results:
The phrase is searched for and it is highlighted on the page, the text selection from earlier remains the same ("all of the fonts")

Actual results:
The phrase is highlighted but the text-selection is extended (see screenshot)

Note
This only occurs when selecting a phrase that spans across multiple rows

Regressed by: 1754585

Calixte, could you take a look? It's likely a regression of https://github.com/mozilla/pdf.js/pull/13261.

Peter, can you reproduce this with other PDFs too or just the one you attached?

Flags: needinfo?(peter.magyari)
Flags: needinfo?(cdenizet)

Yes, I can reproduce this on every PDF I've checked.

Flags: needinfo?(peter.magyari)
Flags: needinfo?(cdenizet)

Sorry, I didn't mean to remove the NI from Calixte.

Flags: needinfo?(cdenizet)

Set release status flags based on info from the regressing bug 1754585

Has Regression Range: --- → yes

I'm not convinced that this is actually a regression, since with a slight modification of the STR this can also be reproduced in e.g. the current Firefox ESR version as well.

Steps to reproduce:

Doing this also reproduces this bug, which as far as I'm concerned rules out this being a regression from PR https://github.com/mozilla/pdf.js/pull/13261 and this rather seem to be a much older issue.

Given comment 5, this is not a regression.

Has Regression Range: yes → ---
Flags: needinfo?(cdenizet)
Keywords: regression
No longer regressed by: 1754585

(In reply to Marco Castelluccio [:marco] from comment #6)

Given comment 5, this is not a regression.

At least, not a regression from https://github.com/mozilla/pdf.js/pull/13261.

Peter, with the modified STR, could you check if this is an older regression?

Flags: needinfo?(peter.magyari)

I was able to reproduce it without the space (Comment 5) on a build from 2019-10-03 so it is indeed not a recent regression but for some reason I have an issue opening builds older than that, so I wasn't able to run mozregression properly.

Flags: needinfo?(peter.magyari)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: