Open Bug 1505469 Opened 6 years ago Updated 11 months ago

Remove browser.gesture.tap pref and stop sending eTapGesture events

Categories

(Core :: Panning and Zooming, task)

Unspecified
macOS
task

Tracking

()

People

(Reporter: fiveNinePlusR, Unassigned)

References

Details

macOS and iOS have a smart zoom feature for their trackpad and magic mouse peripherals where you double tap without clicking and it zooms in and out of the main content feature that you double tap on. for example, double tapping on a paragraph of text will zoom and center the window to that section of text. double tapping again would reset the zoom back out. I have seen this implemented in chrome and safari on macOS and safari on iOS.

At the very least it would be nice to prevent the double tapping from resetting the zoom back to 100% when zoomed in to a different zoom level when that preference is switched on. 

Description of the feature:

https://support.apple.com/en-us/HT204895
(In reply to fiveNinePlusR from comment #0)
> At the very least it would be nice to prevent the double tapping from
> resetting the zoom back to 100% when zoomed in to a different zoom level
> when that preference is switched on. 

Are you talking about a current behaviour of Firefox here? If so, can you clarify what preference you mean?
(Double-tap-to-zoom on Mac is tracked in bug 674371, so that part is a duplicate.)
> Are you talking about a current behaviour of Firefox here? If so, can you clarify what preference you mean?

Yes, it's current behavior in firefox. The preference is called smart zoom on mac and when it's enabled the double tap will zoom to 100%.

It looks like the other part is a dupe of that bug in comment 2.
(In reply to fiveNinePlusR from comment #3)
> Yes, it's current behavior in firefox. The preference is called smart zoom
> on mac and when it's enabled the double tap will zoom to 100%.

Markus, can you reproduce this? Is it Mac widget code responding to the double-tap?
for the built in trackpad the gesture is a double tap with two fingers. for the magic mouse it's a double tap with one finger. i have also tried to make it happen with that preference disabled and it will not reset the zoom so it's definitely that preference causing an issue.
This gets handled at [1] in the widget code and then I think by the frontend code at [2]. So to implement smart zoom we'll need to wait until APZ zooming works on desktop. But to disable the current behaviour (which I can reproduce) we'd want to make changes to the front-end code somewhere, probably after UX consultation. So it's better to file another bug for that issue.

[1] https://searchfox.org/mozilla-central/rev/d850d799a0009f851b5535580e0a8b4bb2c591d7/widget/cocoa/nsChildView.mm#4161
[2] https://searchfox.org/mozilla-central/rev/d850d799a0009f851b5535580e0a8b4bb2c591d7/browser/base/content/browser-gestureSupport.js#101
Actually since the double-tap support is tracked by bug 674371, let's use this bug for disabling the current behaviour if desired.
Component: Panning and Zooming → General
Product: Core → Firefox
Summary: Implement the Smart Zoom feature in macOS → Stop resetting the zoom when attempting to use the Smart Zoom feature (double-tap) in macOS
Depends on: 674371
Priority: -- → P5

This can be worked around by setting the pref browser.gesture.tap to the empty string.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED

Jim, a long time ago (in bug 479901) you added some code which resets zoom when double-tapping (or two-finger-tapping?) on Windows touchscreens: https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/widget/windows/nsWinGesture.cpp#206-211

Do you know if this code is still being exercised? Is the "reset zoom" behavior still wanted on Windows? I'd like to remove it for macOS. I could just remove the pref browser.gesture.tap but doing so will affect Windows as well (if this code is still hit), so I'd like to make sure I won't break anything that we want to keep.

Flags: needinfo?(jmathies)
Depends on: 1696801

I think all that gesture code (which was aimed at Win7 tablet support) is pointless now. I seriously doubt we have a lot of tablet users on Win7, and (I believe) APZ is handling touch now on new operating systems.

Flags: needinfo?(jmathies)

Thanks.

Renaming this bug because bug 1696801 already took care of what this bug was originally filed about.

I think we can remove eTapGesture support completely now.

Assignee: mstange.moz → nobody
Status: ASSIGNED → NEW
Summary: Stop resetting the zoom when attempting to use the Smart Zoom feature (double-tap) in macOS → Remove browser.gesture.tap pref and stop sending eTapGesture events
Severity: normal → S3
Severity: S3 → --
Type: enhancement → task
Component: General → Panning and Zooming
Priority: P5 → --
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.