with apz.allow_zooming = true touch screen pinches zoom the whole page including pdf.js controls
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox81 | --- | fixed |
People
(Reporter: tnikkel, Assigned: kats)
References
Details
This is basically bug 1625462 but for touchscreen pinches instead of touchpad.
| Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The severity field is not set for this bug.
:bdahl, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Theory: perhaps we are expecting pdf.js to preventDefault() touch events in this scenario, and it's not doing so?
| Assignee | ||
Comment 3•6 years ago
|
||
pdf.js doesn't seem to handle touch events at all outside of "presentation mode". Even in presentation mode it only handles swiping (zooming is not allowed in presentation mode). So we have to implement zooming in pdf.js to make this work.
Comment 4•6 years ago
|
||
Did touchscreen pinch gestures have any effect in pdf.js with apz.allow_zooming=false?
| Assignee | ||
Comment 5•6 years ago
|
||
On my Windows laptop it looks like it did reflow zoom of the entire document (including UI bits). Which seems like what I would expect.
Comment 6•6 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #5)
On my Windows laptop it looks like it did reflow zoom of the entire document (including UI bits). Which seems like what I would expect.
Interesting. On Linux, reflowing zoom (activated via Ctrl+mousewheel) zooms the PDF content but not the controls.
| Assignee | ||
Comment 7•6 years ago
|
||
Yeah that's handled by pdf.js, they preventDefault the ctrl+mousewheel and zoom the content. So it's not actually triggering browser reflow zoom. Touch doesn't dispatch mousewheel though.
Comment 8•6 years ago
|
||
Ah, I see.
So we could probably at least restore the previous behaviour (of reflow-zooming the PDF controls) by having APZ take the NotifyPinchGesture codepath for pdf.js pages (but it would require APZ knowing that it's a pdf.js page), but matching the behaviour of ctrl+mousewheel (which is to not zoom the PDF controls at all) would require changes to pdf.js like you said.
| Assignee | ||
Comment 9•6 years ago
|
||
I don't think reflow zoom is a particularly useful thing to do on pdf.js because the UI ends up looking smushed. I intend to just disable all pinch behavior by calling preventDefault on the second touchstart. Eventually it could have it's own pinch zoom implementation but that seems out of scope for this bug and might require UI fiddling in pdf.js as well.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 10•6 years ago
|
||
https://github.com/mozilla/pdf.js/pull/12212
I realized though that with apz.allow_zooming=true we also support the one-touch-pinch gesture, which is kind of an Android-ism that we probably don't want to have on desktop. In particular calling preventDefault() on a multi-touch touchevent doesn't prevent zooming via one-touch-pinch so it's still possible to zoom on things like pdf.js (with above PR) using the gesture. I'll file an APZ bug for that.
| Assignee | ||
Updated•6 years ago
|
Description
•