Closed Bug 1693249 Opened 5 years ago Closed 5 years ago

Touchpad Pinch Zoom causes reflow-zooming with "Zoom Page WE" addon installed

Categories

(WebExtensions :: Developer Outreach, defect, P3)

Firefox 85
Desktop
All
defect

Tracking

(firefox85 affected, firefox86 affected, firefox87 affected)

RESOLVED FIXED
Tracking Status
firefox85 --- affected
firefox86 --- affected
firefox87 --- affected

People

(Reporter: c21, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.2; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

macbook air m1, (set mouse pointer to fast in MacOS settings), pinch-zooming on website leads to extremely fast zooming, impossible to get it to the desired zoom level.

Actual results:

see above

Expected results:

it should zoom much slower. at the moment, minimal movement of the pinching fingers lead to massive and fast zooming steps.

ideeally there should be an option to select "pinch zoom: very fast - fast - normal - slow - very slow.

The Bugbug bot thinks this bug should belong to the 'Core::Panning and Zooming' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Panning and Zooming
Product: Firefox → Core

Hmm, is this M1 only? Or macOS 11 only? I tried on 10.15 adjusting tracking speed under trackpad in settings to maximum doesn't seem to change pinch zoom at for me.

Component: Panning and Zooming → Widget: Cocoa

I added the information only for the sake of completeness.
I do not know if it has anything to do with M1 / Apple Silicon. I only have this one MacBook.
I am sorry I did not test if changing trackpad pointer speed changes anything. I tested now and it does NOT change the problem. I just assumed it must be that because it is so insanely fast. I thought no way can that be the normal way, so I assumed it's because my mouse pointer is relatively fast (it's a the rightmost side, but in my opinion still not particularly fast).
It is "all the better" that it has nothing to do with the pointer speed as this removes a variable.
In general I would appreciate it if the pinch zooming would make better use of the trackpad, had more steps, where much slower.
Just in case there is any doubt: it is definitely unusable. I do not have issues doing delicate movements on the trackpad. With luck I manage to get it to stop just at the right moment in zooming.

No worries, I'm just asking questions of anyone that might know, not necessarily you. Thanks for your answer.s

When you says steps, does pinch zooming happen smoothly or in steps for you?

I large, distinct steps. Small pinch zooming movement = large step.

Cheers

*In

FYI, by comparison, zooming works very nicely (on the M1 Air) in Chrome and Opera.

Hmm, distinct steps, you shouldn't ever be getting distinct steps when pinch zooming with Firefox. Have you changed any settings in Firefox or in your macOS settings that might affect this? Can you upload your about:support?

Flags: needinfo?(c21)

I solved the problem, and it's FireFox's fault!

Thank you a LOT for helping me, you pointed me to the possible, and de facto cause of this.

After installing FF, I went to FF website to install extensions that are RECOMMENDED BY FIREFOX.

The Exension "Zoom Page WE" was recommened by Firefox with a "golden award cup" symbol, so I trusted it to be an excellent choice.

I disabled the extension and the zoom issue was fixed.

Firefox should not recommend extensions that break it!!! Please forward this to the extension evaluation team. Instead they should put a warning that it will break smooth zooming.

The extension does mention the problems somewhere down in the extension description, and various methods to fix it which is not what average users will be doing.

Thank you again.

Flags: needinfo?(c21)

Thanks for figuring that out. In order to track down what the issue might be (so I can understand and advise the extension to fix) I tried to install that addon and reproduce the problem but I wasn't able to. Did you change some settings of that addon maybe?

I re-installed the extension. At first things continue to work, but after a restart of firefox it was broken again.
I uninstalled it AGAIN and it worked AGAIN.

I hope that helps.
Thank you again for having helped me.

I can confirm the problem on OS X 10.15, 16" MBP with external trackpad.

STR as described by the reporter in the last comment 11:

  • Install extension Zoom Page WE
  • Restart Firefox (edit: no restart required)
  • Try pinch-zooming (edit: on a page other than about:newtab or AMO)

The problem seems to be that the extension reacts to the same pinch gesture, triggering both APZ and reflow zoom at the same time. This gives a stuttering and fast zooming effect.

(In reply to Martin Balfanz [:mbalfanz] from comment #12)

I can confirm the problem on OS X 10.15, 16" MBP with external trackpad.

STR as described by the reporter in the last comment 11:

  • Install extension Zoom Page WE
  • Restart Firefox
  • Try pinch-zooming

The problem seems to be that the extension reacts to the same pinch gesture, triggering both APZ and reflow zoom at the same time. This gives a stuttering and fast zooming effect.

Weird, when I do the exact same thing (except I'm using the built in touch pad) it zooms at the same rate for me.

That's really weird.

Playing with it some more, I can reproduce the problem on any page except about:newtab and any AMO page. (I guess those two are not affected by extensions).

FWIW I can also reproduce it on a Win10 Surface Pro.

Ah, that's why, I was testing on an amo page because that was right there. Do you know who we can contact to at least get this extension removed from recommended or fixed?

I'll ping the AMO channel. I'm sure they know what to do :)

DW-dev is the author of https://addons.mozilla.org/en-US/firefox/addon/zoom-page-we/ and also on Bugzilla.

@DW-dev - Is it possible to update your add-on with a fix for this bug?

Flags: needinfo?(dw-dev)

Rob, thanks for letting me know. I haven't received any recent problem reports regarding pinch zoom. I did receive one problem report in August 2020 about a pinch-zoom problem on Mac OS. That was fixed by adding a new option: "Use custom Zoom Levels for Ctrl+Wheel zooming". Disabling this option fixes the pinch-zoom problem. This is clearly documented on the Zoom Page WE extension page:

IMPORTANT NOTES

Touch Pad/Screen - When using a touch pad or touch screen with Zoom Page WE, unexpected zooming or jittering may occur.
In this case, disable the 'Use custom Zoom Levels for Ctrl+Wheel zooming' option.

When a user does a pinch-zoom gesture on the touch pad, Firefox automatically generates a Ctrl+Wheel event. This event is intercepted by Zoom Page WE, which then tries to apply normal reflow zoom. Unfortunately, it is not possible for Zoom Page WE to distinguish between a real Ctrl+Wheel event (when the user presses the Ctrl key and rotates the mouse Wheel) and a Firefox generated Ctrl+Wheel event.  So the only way to resolve this issue is for Zoom Page WE to ignore Ctrl+Wheel events.

By the way, when I tried to do some testing earlier today with Firefox Nightly to confirm that there are no other issues, I discoverted that console.log() messages no longer appear in the Browser Toolbox. Is this a known issue?

Flags: needinfo?(rob)

(In reply to dw-dev from comment #18)

Rob, thanks for letting me know. I haven't received any recent problem reports regarding pinch zoom. I did receive one problem report in August 2020 about a pinch-zoom problem on Mac OS. That was fixed by adding a new option: "Use custom Zoom Levels for Ctrl+Wheel zooming". Disabling this option fixes the pinch-zoom problem. This is clearly documented on the Zoom Page WE extension page:

IMPORTANT NOTES

Touch Pad/Screen - When using a touch pad or touch screen with Zoom Page WE, unexpected zooming or jittering may occur.
In this case, disable the 'Use custom Zoom Levels for Ctrl+Wheel zooming' option.

When a user does a pinch-zoom gesture on the touch pad, Firefox automatically generates a Ctrl+Wheel event. This event is intercepted by Zoom Page WE, which then tries to apply normal reflow zoom. Unfortunately, it is not possible for Zoom Page WE to distinguish between a real Ctrl+Wheel event (when the user presses the Ctrl key and rotates the mouse Wheel) and a Firefox generated Ctrl+Wheel event.  So the only way to resolve this issue is for Zoom Page WE to ignore Ctrl+Wheel events.

I'm not familiar with the specifics of pinch zoom, but I would expect it to be distinguishable from a synthetic Ctrl-Wheel event. Have you compared the difference between the two events? Even if the properties are virtually identical, then it may still be possible to detect the difference, e.g. by detecting whether the Ctrl-key has been pressed.

(In reply to dw-dev from comment #19)

By the way, when I tried to do some testing earlier today with Firefox Nightly to confirm that there are no other issues, I discoverted that console.log() messages no longer appear in the Browser Toolbox. Is this a known issue?

Have you enabled the option to include Content Messages in the browser console?

Component: Widget: Cocoa → Developer Outreach
Flags: needinfo?(rob)
Product: Core → WebExtensions

(In reply to dw-dev from comment #18)

When a user does a pinch-zoom gesture on the touch pad, Firefox automatically generates a Ctrl+Wheel event. This event is intercepted by Zoom Page WE, which then tries to apply normal reflow zoom. Unfortunately, it is not possible for Zoom Page WE to distinguish between a real Ctrl+Wheel event (when the user presses the Ctrl key and rotates the mouse Wheel) and a Firefox generated Ctrl+Wheel event.  So the only way to resolve this issue is for Zoom Page WE to ignore Ctrl+Wheel events.

If you are listening for ctrl+wheel events and performing zooming based on them you should be called preventDefault and that should stop the pinches from also performing smooth zooming.

But with that said I don't think that replacing smooth zoom with reflow zoom should be the default mode of your extension unless the entire point of your extension was to disable smooth zoom. Rather than have an option to fix this that most people aren't going to read you should make the default behaviour something that does not break a core interaction in Firefox.

(In reply to Timothy Nikkel (:tnikkel) from comment #21)

If you are listening for ctrl+wheel events and performing zooming based on them you should be called preventDefault and that should stop the pinches from also performing smooth zooming.

Zoom Page WE does call event.preventDefault if it performs zoom based on ctrl+wheel events. However, a recent change in Firefox 84 (Bug 1673278) now defaults the 'passive' option to true for a wheel event listener, causing event.preventDefault to have no effect. There is a fix to address this change already included in the next version (18.0) of Zoom Page WE.

But with that said I don't think that replacing smooth zoom with reflow zoom should be the default mode of your extension unless the entire point of your extension was to disable smooth zoom. Rather than have an option to fix this that most people aren't going to read you should make the default behaviour something that does not break a core interaction in Firefox.

I don't disagree, but it wasn't a big issue before the change in Bug 1673278. In 4½ years, I have had only had one other issue reported in relation to pinch-zoom and that was a conflict between another zoom extension and Zoom Page WE. The simple solution is to make the "Use custom Zoom Levels for Ctrl+Wheel zooming" option disabled by default (on installation). I will include this change in the next version (18.0) of Zoom Page WE.

Hello,

We’ve reproduced the issue on the latest Nightly (87.0a1/20210219094547), Beta (86.0/20210217195321) and Release (85.0.2/20210208133944) under macOS 11.1.

Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to dw-dev from comment #22)

In 4½ years, I have had only had one other issue reported in relation to pinch-zoom and that was a conflict between another zoom extension and Zoom Page WE.

Smooth pinch zoom was enabled last year, so not really much chance of a bug like this happening until that.

Thanks dw-dev for handling this.

Severity: -- → S3
Priority: -- → P3
OS: Unspecified → All
Hardware: Unspecified → Desktop
Summary: Touchpad Pinch Zoom much too fast on MacBook Air M1 2020 → Touchpad Pinch Zoom causes reflow-zooming with "Zoom Page WE" addon installed

Zoom Page WE 18.0 has now been released and resolves this problem.

The changes made to address this problem are:

  1. The 'Use custom Zoom Levels for Ctrl+Wheel zooming' option has been renamed to 'Use Zoom Levels for Ctrl+Wheel & Pinch zooming' to make it clear that it affects both Ctrl+Wheel zooming and Pinch zooming.
  2. This option is now disabled on first installation and also disabled when updating to Version 18.0.
  3. When this option is enabled, Zoom Page WE applies reflow zoom using the zoom levels defined in Zoom Page WE Options.
  4. The wheel event listenerhas been made non-passive (see Bug 1691727), so that when this option is enabled, calling event.preventDefault prevents both scrolling and smooth zooming (see Comment 21), which is how this option is meant to work.

Thanks for your update and quick response!

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(dw-dev)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.