Open Bug 1559648 Opened 4 months ago Updated 3 months ago

pdf select word no right


(Firefox :: PDF Viewer, defect, P3)

67 Branch





(Reporter: zsytssk, Unassigned)


(Whiteboard: [pdfjs-c-ux][pdfjs-d-text-selection] )


(1 file)

Attached image 20190616075206.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

open pdf, select text

Actual results:

the firefox highlight text is not really selected text

Expected results:

highlight selected text

I saw the selection problem also by disabling WebRender.

It might be better to be checked by PDF Viewer at first.

Component: Graphics: WebRender → PDF Viewer
Product: Core → Firefox

The priority flag is not set for this bug.
:bdahl, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bdahl)
Flags: needinfo?(bdahl)
Priority: -- → P3
Whiteboard: [pdfjs-c-ux][pdfjs-d-text-selection]

It's possible the transparent text layer is not properly aligned with the background canvas in that PDF. You can use right-click > Inspect Element on text in the PDF, then in the right pane (Rules), look for a rule that starts with:

.textLayer > span {
    color: transparent;

Uncheck the color rule and a light gray text layer should become visible. How's the alignment with the background? If you have an example PDF where it is very off, that would be worth a look.

However, perhaps it could be a glitch in the extension API. What extension is that? I'm assuming it creates a right-click context menu option.

Extensions cannot read directly from the page in the built in pdf.js viewer because they are treated as privileged pages. Instead, the extension's menu click handler receives various information including a selectionText property:

So possibly the error relates to how the selectionText is derived rather than whether the selection shown in the viewer matches the actual selection, if that makes any sense. It would be useful to take a look at the extension and see what it is doing to know whether that is relevant.

You need to log in before you can comment on or make changes to this bug.