Closed Bug 1644529 Opened 4 years ago Closed 4 years ago

Pinch to Zoom on PDF.js unevenly zooms menus and content.


(Core :: Panning and Zooming, defect, P3)

79 Branch





(Reporter: sraghuvanshi, Unassigned)




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

Steps to reproduce:

I am on Windows 10. I have the following about:config settings enabled: to true
apz.allow_zooming to true

Open a PDF file using the built-in PDF viewer. Then, try to pinch to zoom on a precision trackpad.

Actual results:

Note that this bug is a byproduct of the fix for Bug 1643461.
It is also appears in conjunction with bug 1643097.

When I pinch to zoom on a PDF, the entire webpage zooms. And it's kind of janky because the PDF.js menus zoom unevenly compared to the actual webpage content.

See a screen recording here:

I pinch to zoom in and out using my trackpad a few times. I also hit Ctrl-0 a couple times --- that only affects the content zoom, not the overall page zoom. Please let me know if you need anything else.

Expected results:

When my mouse is focused on the PDF content, only the content should zoom in or out.

When my mouse is focused on the PDF.js menus, then the entire webpage should zoom evenly (menus and content included --- it should behave like zooming in on a screenshot of PDF.js).

When I press Ctrl-0, the overall page zoom (i.e. the PDF.js menus) should go to 100%, and the page content should go to "automatic zoom".

Flags: needinfo?(tnikkel)

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Panning and Zooming
Product: Firefox → Core
Ever confirmed: true

I can reproduce with a touchpad. With a touchscreen it zooms the controls and all. I cannot reproduce on mac though. Not sure what's going on here exactly.

Severity: -- → S3
Priority: -- → P3

I built the latest PDF.js master from and ran it on Chrome. Regardless of where on the screen my mouse pointer is, using the touchpad zooms the content, and the PDF.js menus are unaffected. Therefore, this is a bug in Firefox, not PDF.js, I think. However, bug 1643097 still looks like it's occurring.

I think bug 1648489 will fix this.

Depends on: 1648489
Flags: needinfo?(tnikkel)

Would you mind re-testing this in a build with bug 1648489 fixed? Jul 2 nightly should definitely have it.

Flags: needinfo?(sraghuvanshi)

Looks like this specific issue is fixed! Thank you!!!

Pinch-to-zoom on the whole is still unusable because of bug 1643097, but this is a step in the right direction!

Flags: needinfo?(sraghuvanshi)

I can't seem to close the bug --- can someone else please take care of it?

Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.