double tap on tall wide element after zooming in scrolls up
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
Attachments
(2 files)
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
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
Updated•3 years ago
|
Comment 3•3 years ago
|
||
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.
Assignee | ||
Comment 4•3 years ago
|
||
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?
Comment 5•3 years ago
|
||
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.
Assignee | ||
Comment 6•3 years ago
|
||
I'm not sure what I did different but I can reproduce now. Thanks.
Comment 7•3 years ago
|
||
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
Comment 9•3 years ago
|
||
bugherder |
Assignee | ||
Comment 10•3 years ago
|
||
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.
Updated•3 years ago
|
Comment 11•3 years ago
|
||
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.
Description
•