Closed Bug 1699180 Opened 3 years ago Closed 3 years ago

Double-tapping on the browser’s horizontal scroll bar zooms out of the in focused content and moves the focus to the beginning of the document/webpage

Categories

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

Firefox 88
All
macOS
defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox88 --- disabled
firefox89 --- verified

People

(Reporter: emilghitta, Assigned: tnikkel)

References

Details

Attachments

(2 files)

Affected versions

  • Firefox 88.0a1 (BuildId:20210317095331)

Affected platforms

  • macOS 10.14
  • macOS 11.1

Unaffected platforms

  • Windows 10 64bit
  • Ubuntu 20.04

Preconditions

  • Have apz.mac.enable_double_tap_zoom_touchpad_gesture pref enabled

Steps to reproduce

  1. Launch Firefox.
  2. Access any website.
  3. Double-tap to zoom inside a desired area (in order to trigger the browser's horizontal scrollbar).
  4. Hover on the horizontal scrollbar and double-tap to zoom.

Expected result

  1. Double-tap to zoom functionality doesn’t work while the horizontal scrollbar is hovered/focused

Or

  1. Double-tapping while hovering the horizontal scrollbar doesn’t lead to “zoom out” from the focused content and it re-focuses the zoom on a different area of interest (as in Safari).

Or

  1. Double-tapping while hovering the horizontal scrollbar leads to a "zoom out" from the focused content but it doesn't move the focus to the beginning of the document.

Actual result

  • Double-tapping on the browser’s horizontal scroll bar zooms out of the in focused content and moves the focus on the beginning of the document/webpage.

Regression Range

  • I don’t think that this is a regression.

Notes

  • This behavior could affect users which navigate through a long document/wbpage by using double-tap to zoom in order to bring new areas in focus and are accidentally double-tapping on the horizontal scrollbar.
  • The same behavior can be observed on the vertical scrollbar but the chances of users to double-tap there are lower.
  • For further information regarding this issue, please observe the following screencast (Unfortunately the file size exceeds the bugzilla limit. Mozilla account needed).
Severity: -- → S4
Has STR: --- → yes

Martin can you please help set a priority?

Flags: needinfo?(mbalfanz)

It seems a bit like an edge case, but it would be good to look into it. The current behavior is unexpected from a users POV.

From the 3 suggested expected behaviors, I would agree that we should do either 1 or 2, with 2 being preferred.

Flags: needinfo?(mbalfanz)
Priority: -- → P3

The double tap to zoom code skips over scrollbars because of the native anonymous check

https://searchfox.org/mozilla-central/rev/4e87b5392eafe1f1d49017e76f7317b06ec0b1d8/gfx/layers/apz/util/DoubleTapToZoom.cpp#47

So it finds the html element, and the primary frame of the html element is the scrolled block frame inside the scrollframe for it. So the rect we try to zoom to is the rect of the entire page. I think only the root scroll frame can have this problem because other scroll frames have the scroll frame as the primary frame not the scrolled frame. So a simple special case for the root scroll frame in a situation like this should work.

Actually, the scrollbar is a red herring here. Any time you double tap on a page and it finds an element that covers (almost) the whole page (ie html, body) we'll get the same behaviour. And in fact Safari and Chrome both don't handle that situation well either. We have heuristics for tall elements like this, so I'll see why they aren't working here.

It'll end up scrolling to the top.

Depends on D110534

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

Depends on D110535

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56d082495493
Don't try to double tap zoom to html elements. r=botond
https://hg.mozilla.org/integration/autoland/rev/5e462f6d1458
Add test. r=botond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

So, it seems that we went with the number 3 from the suggested expected result.

I can confirm that this is verified fixed on macOS 10.15 using Firefox 89.0a1 (BuildId:20210411210108). If double tapping the horizontal scroolbar while zoomed in (via double tap to zoom) Firefox zooms out successfully without scrolling to the top of the page.

Status: RESOLVED → VERIFIED
Has Regression Range: --- → irrelevant

Yes, number 3 seemed like the best outcome. Thank you checking.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: