Closed Bug 1660054 Opened 4 years ago Closed 4 years ago

Can't reset new pinch zoom

Categories

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

Firefox 81
defect

Tracking

()

VERIFIED FIXED
84 Branch
Tracking Status
firefox80 --- disabled
firefox81 --- disabled
firefox82 --- disabled
firefox83 --- verified
firefox84 --- verified

People

(Reporter: hecerinc, Assigned: kats)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

Steps to reproduce:

On my laptop:

Opened https://www.w3.org/TR/WCAG21/#operable, pinched to zoom with the trackpad.

Actual results:

The new pinch zoom that shipped in FF 80+ (I think it was 81) where the content doesn't reflow but instead just zooms (like Chrome does) was activated and the content was zoomed. But then I connect my laptop to my hub and can no longer use the trackpad to zoom out. However, the pinched zoom persists, and I can't zoom out through normal means. (Ctrl scroll)

Expected results:

I should have a way to reset this zoom like the normal reflow zoom can via the URL bar.

Assigning "Core: Panning and Zooming" component.

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

(In reply to hecerinc from comment #0)

But then I connect my laptop to my hub and can no longer use the trackpad to zoom out.

Can you describe a bit more what hardware you're using? Which laptop and which hub?

As a workaround while the issue is fixed, reloading the page with Ctrl+Shift+R should reset the pinch zoom.

(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)

(In reply to hecerinc from comment #0)

But then I connect my laptop to my hub and can no longer use the trackpad to zoom out.

Can you describe a bit more what hardware you're using? Which laptop and which hub?

I'm using a ThinkPad P52S, and the ThinkPad Hybrid USB-C with USB-A dock, although I suppose the problem would still be there with any other laptop. The basic gist being that if you (for any reason) lose access to the trackpad, there's no GUI control to reset the pinch zoom.

(In reply to Botond Ballo [:botond] from comment #3)

As a workaround while the issue is fixed, reloading the page with Ctrl+Shift+R should reset the pinch zoom.

This did work :) A bit hidden for most users, I think.

By the way, for the zoom team that implemented this: Top notch job! 💯 I absolutely love this feature and have been looking forward to FF implementing this for years! Thanks!

Martin, any thoughts on this? Seems like a good argument to expose a smooth-zoom indicator in the UI (or at least some way to reset it).

Flags: needinfo?(mbalfanz)

Yea, good call. Thanks for bringing this to my attention!

The indicator might be an option. It also reminds me that we were talking about mouse interactions for this feature. Let me think about this a bit and also consult with UX to get some more feedback.

Flags: needinfo?(mbalfanz)

(personally, I lean towards the indicator as it will help all users. And as the reporter said, it makes the force reset more discoverable as well. But with the desktop team working a lot on the UI right now I want to make sure we have them on board)

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

I saw in another bug a request to make ctrl-0 also reset the pinch zoom (it currently only resets the reflow zoom), which seems reasonable at first thought.

That is an excellent suggestion! +1 from me.

UX was against an additional UI component, and I think this known keyboard shortcut strikes a great balance.

It took a while, but there is a clear preference to not add anything to the UI. Resetting zoom using ctrl/cmd-0 is the preferred option.

We'll probably want to change the line here to do something like FullZoom.reset(); FullZoom.resetApzZoom() and add the latter function to actually reset APZ zoom. Or we could put the function not in FullZoom, but regardless, we presumably will want it hooked up to cmd_fullZoomReset.

I can use this bug to hook up ctrl+0.

Assignee: nobody → kats
Status: UNCONFIRMED → NEW
Ever confirmed: true

The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.

Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.

Hi Stuart, a question came up about interaction between this bug and the WebExtensions API, and I was hoping you can redirect to somebody who can provide a definitive answer. As you may be aware, in Firefox 83 we are shipping a "pinch zoom" feature that does mobile-style scaling zoom on desktop. This bug is about adding a mechanism for users to "reset" the zoom back to the default initial zoom. Based on feedback from product, the patch above hooks up the ctrl+0 keyboard shortcut (currently used to reset reflow zoom) to also reset the new scaling zoom. Similarly, the "100%" buttons in the hamburger menu and URL bar that reset the reflow zoom will also reset the scaling zoom.

There is apparently also some webextension API surface area that allows extensions to control the zoom. In particular, the tabs.setZoom() API can also trigger a reset of the reflow zoom. Should this API also trigger a reset of scaling zoom? I was leaning towards no, since this is a programmatic use case - existing extensions may be using this API in such a way that if we also make it reset scaling zoom that would produce unexpected behaviour for the user. But on the patch :Gijs brought up the fact that the existing API also affects things like pdf.js and about:reader so maybe it makes to also reset scaling zoom. Do you know who can make a call on this?

Flags: needinfo?(scolville)

(Stuart is out, but I'll answer the question)

I suggest to not reset the pinch zoom level via browser.tabs.setZoom(tabId, 0), because it would be inconsistent to offer a way to reset it without the ability to set it through the API. If there is ever demand for the ability to (re)set pinch zoom via an extension, then we can expand the API to support it (file a new bug in WebExtensions::General ).

Flags: needinfo?(scolville)
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/952da6bff887 Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond

Ah, looks like it's failing on Windows because the pinch zoom synthesization is failing. I'll fix and retest before landing.

Flags: needinfo?(kats)
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1acd12e7660e Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs,nika,botond
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Comment on attachment 9183509 [details]
Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs!,nika!,botond!

Beta/Release Uplift Approval Request

  • User impact if declined: User may find it harder to reset the pinch zoom after zooming in.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Pinch zoom in on various pages and verify that the following methods all work to reset the pinch zoom:
  • clicking the "100%" label in the hamburger menu
  • pressing the ctrl+0 keyboard shortcut
  • changing the reflow zoom (e.g. via ctrl++ or ctrl+-) and then clicking the zoom percentage indicator that appears in the url bar
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Most of the patch is just plumbing, the actual change is pretty small. It's not an urgent thing to uplift as product was ok shipping the pinch zoom feature without this, but since the patch is done and relatively straightforward I figured I'd request uplift anyway.
  • String changes made/needed: none
Attachment #9183509 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9183509 [details]
Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs!,nika!,botond!

It's a P3/S3, we have shipped several releases with this bug and I am not seeing duplicate reports of this bug which would help justify the uplift, this can probably just ride the trains, thanks though!

Attachment #9183509 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

(In reply to Pascal Chevrel:pascalc from comment #25)

Comment on attachment 9183509 [details]
Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs!,nika!,botond!

It's a P3/S3, we have shipped several releases with this bug and I am not seeing duplicate reports of this bug which would help justify the uplift, this can probably just ride the trains, thanks though!

Just to be clear, this isn't a bug that we have shipped on release. It's only a bug when desktop/pinch zooming is enabled, which is happening in 83 release. You could consider this a completeness bug for the new feature in 83.

Flags: needinfo?(pascalc)
QA Whiteboard: [qa-triaged]

Verified as fixed on Firefox Nightly 84.0a1 (2020-10-30) on Windows 10 x64 (Touchscreen and touchpad) and on MacOS 10.15 (Touchpad).

See Also: → 1665439

Well I guess it's too late to uplift now.

Flags: needinfo?(pascalc)

Actually I'll put the needinfo back for now, would be good to get a confirmation from Pascal that he really doesn't want to uplift this despite the misunderstanding above. Uplifting this would help the user experience with the new pinch-zooming feature, as we have had a few people complain about accidentally triggering it and not knowing how to reset it.

Flags: needinfo?(pascalc)

I'd like to second that. Resetting has been the number one problem that was reported during the Nightly/Beta testing. This patch addresses that and enhances the first impression a lot.

Comment on attachment 9183509 [details]
Bug 1660054 - Hook up the zoom-reset action to also reset APZ/scaling zoom. r=Gijs!,nika!,botond!

Hi, given the additional context information, I am taking this patch in beta, thanks!

Flags: needinfo?(pascalc)
Attachment #9183509 - Flags: approval-mozilla-beta- → approval-mozilla-beta+

Verified as fixed on Firefox 83.0b9 on Windows 10 x64 (Touchscreen and touchpad) and on MacOS 10.15 (Touchpad).

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: