"Dead zone" during scrolling when panning back and forth in a single gesture (sticky axis locking eats vertical movement in some cases)
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: mstange, Assigned: dlrobertson)
References
(Blocks 3 open bugs)
Details
Attachments
(3 files)
Steps to reproduce:
- Go to a page that's scrollable both vertically and horizontally, for example https://loglog.games/blog/leaving-rust-gamedev/ .
- Scroll down into the middle of the page.
- Do an "up 40%, down 80%" scroll gesture: With your finger starting in the middle of the screen, scroll up, and, without lifting your finger, scroll back down, and past where your finger started.
- Optionally, with your finger still on the screen, keep scrolling back and forth.
Expected results:
Scrolling should behave normally.
Actual results:
Whenever your finger goes past the position where it started, there is a "hitch" in the scrolling - some of the vertical delta of your pan movement is absorbed and doesn't result in the page moving vertically.
The further your finger has drifted horizontally away from the X position where the finger started, the longer the "hitch" - the bigger the "dead zone".
What happens here is that sticky axis locking remembers where the pan gesture started. Whenever the vector between the touch down position and the current position has a bigger horizontal component than vertical component, no vertical scrolling happens. This creates triangular zones emanating from the touch start position where vertical scrolling is blocked.
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:botond, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•2 years ago
|
||
This is one of the bugs we're tracking in FFXP-2856.
Comment 3•2 years ago
|
||
The code in question is here in AsyncPanZoomController::HandlePanningUpdate;
ParentLayerPoint vector =
ToParentLayerCoordinates(aPanDistance, mStartTouch);
float angle = atan2f(vector.y, vector.x); // range [-pi, pi]
angle = fabsf(angle); // range [0, pi]
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
For long touch scrolls that change direction, using the start point of
the touch scroll as the origin to calculate the angle of the scroll is
problematic for determine the axis that should be locked. Maintain a
list of recent touch gesture points and calculate the gesture angle from
the most recent touch gesture points.
| Assignee | ||
Comment 5•1 year ago
|
||
Add a minimum size parameter to the RecentEventsBuffer, for the scenario
in which we would prefer data from stale events to that of the fallback.
| Reporter | ||
Comment 6•1 year ago
|
||
I've tested a local GVE build with this patch applied and can confirm that it solves the problem! It feels much much better than before. Thank you!
Comment 8•1 year ago
|
||
Backed out for causing GTest failures
Backout: https://hg.mozilla.org/integration/autoland/rev/5ea40820794cd8b6a1197e612015c77f7792e7b7
Failure log: https://treeherder.mozilla.org/logviewer?job_id=472778516&repo=autoland&lineNumber=5009
| Assignee | ||
Comment 9•1 year ago
|
||
Found a way to reproduce this try failure locally over the weekend.
Comment 10•1 year ago
|
||
I see these patches were pushed to Try recently and I'm not seeing any failures that look related -- is this ready to land?
| Assignee | ||
Comment 11•1 year ago
|
||
Ah rats! I forgot to make the tests only run on android
Comment 12•1 year ago
|
||
(In reply to Botond Ballo [:botond] from comment #10)
I see these patches were pushed to Try recently and I'm not seeing any failures that look related -- is this ready to land?
My bad, I did overlook that the desktop gtest failure is a failing APZ test and so likely caused by the patch.
(In reply to Dan Robertson (:dlrobertson) from comment #11)
Ah rats! I forgot to make the tests only run on android
It looks like the failing test is actually a desktop test that was somehow regressed.
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d8d077687277
https://hg.mozilla.org/mozilla-central/rev/374bd6b07bbf
Description
•