Closed Bug 1658919 Opened 5 months ago Closed 5 months ago

(Maybe) disable one-touch-pinch gesture on desktop

Categories

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

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

The one-touch-pinch gesture is enabled on desktop with apz.allow_zooming=true. However this gesture is an Android-ism that we might not want to keep on desktop. In particular, if web content wants to disable browser zooming (because e.g. they implement it themselves like in Google Maps or pdf.js) then there's no way for them to prevent the one-touch-pinch. On Android it's possible to use meta-viewport tags to block all zooming, but meta-viewport tags are ignored on desktop. The best you can do is call preventDefault() on touchstart events with >1 points (which is what I did for pdf.js) but that only blocks two-finger pinch gestures and not one-touch-pinch.

I guess technically it's still possible for web content to block the gesture, but it would have to implement a touch gesture recognizer that exactly matches the one in the APZ code, and call preventDefault on that second touchstart. But that's not a reasonable thing to be doing.

Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ae89d8c812e
Disable one-touch-pinch on desktop. r=botond
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.