Closed Bug 1710050 Opened 3 years ago Closed 3 years ago

double tap on tall wide element after zooming in scrolls up

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
firefox90 --- verified
firefox91 --- verified

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

No description provided.
Attached file testcase (deleted) —
Depends on: 1710052

The DoubleTapToZoom code starts with the rect for the whole element: let's say it runs the entire height of the (scrollable) page, and the entire width, and the width is enough to make it scrollable horizontally. Then it shrinks the height of the rect so the aspect ratio is the same as the composition bounds. Since the width of the element is wider than the composition bounds at minimum zoom, so too is the height. So it is impossible zoom out far enough to fit the whole target rect. We end up scrolling to the top left of this rect.

We want to zoom out so that we center what was visible before zooming out. This will keep whatever was in the center of the screen stationary. One might think we would want to center the rect on the cursor position, but that leads to scrolling document and does not look/feel good.

The test runs into bug 1710052, so that the layout scroll position never gets updated.

I checked that the test fails locally and on try server without this patch.

Depends on D114587

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

Just a user here who doesn't report bugs. I'm not sure if the following is the same bug.

I see scrolling instead of zooming when double tapping, under some specific conditions.

Affected page: https://www.nytimes.com/2021/05/07/travel/pilots-retraining.html

Screen recording, showing the specific location of the double-tap (which is important): https://cloud.mpi-cbg.de/index.php/s/6eqzGk6RHbiQ3vU

I'm on macOS 10.14.6, MacBook Pro, 1440*900 effective screen resolution, maximized window. Firefox 89.0b9.

Let me know if you need more info. Please make a copy of the screen recording if you want it. I will not be able to keep hosting it indefinitely.

Sorry, somehow I missed this comment until now. Thanks for reporting this. I tried to reproduce but I couldn't. I think some fixes have been uplifted to beta since b9, could you check if it still happens after updating to the latest beta?

Flags: needinfo?(szhorvat)

I can still reproduce it in b14. The behaviour is exactly the same.

I will try later with all extensions disabled and will let you know.

Flags: needinfo?(szhorvat)

I'm not sure what I did different but I can reproduce now. Thanks.

Both the window size, and where exactly I double tap, make a difference.

Thanks for implementing pinch zoom as well as this feature. It's been my single biggest wish for Firefox for many years.

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3cef23ef4814
Double tap on tall wide element after zooming in scrolls up. r=botond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

I filed bug 1713584 about comment 3.

Szabolcs, that was a very good and useful bug report. If you find any other issues I would encourage you to report them. If you don't want to file a bug you can contact me (either via email, matrix, bug comment, etc) and I will file one for you.

Flags: qe-verify+

Reproduced the issue on Firefox 90.0a1 (2021-05-07) under macOS 10.15.7 by using the testcase provided in Comment 1.

The issue is fixed on Firefox 90.0b4 and Firefox 91.0a1 (2021-06-07) on the same machine.

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

Attachment

General

Created:
Updated:
Size: