Continue momentum scroll if the scrollable range grows during overscroll
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
People
(Reporter: mstange, Unassigned)
Details
Attachments
(1 file)
|
890 bytes,
text/html
|
Details |
This was inspired by the Slack scrolling problem described in bug 1865397.
Steps to reproduce:
- Load the attached testcase.
- Do a fling to the bottom of the page.
Expected results:
Once you hit the bottom, the page grows and the momentum of the fling should continue scrolling the page down into the new range.
Actual results:
The fling is stopped abruptly once the page grows. You don't even get the satisfaction of seeing the overscroll rubber banding animation finish.
When we hit the bottom and enter overscroll, macOS (and Windows?) keep sending pan momentum events. However, since we've entered overscroll, we are ignoring those events now.
Botond proposed a simple fix: If we exit overscroll due to a scroll range change, we could change into a state where we respect pan momentum events, so that we continue the fling.
This would not address the problem on Android (and Linux?) where we use our own FlingAnimation to drive the fling.
It would also result in a somewhat discontinuous velocity graph: We start the fling with a high velocity. Then we hit the end of the page and enter overscroll, which limits the velocity. Then the overscroll animation reduces the velocity even more, for a frame or two. Then the page expands, we receive another momentum pan event, and we continue with the "stored fling velocity", which is high again. I think that might feel a bit odd but it should still be a lot better than what we have today.
Updated•1 year ago
|
Description
•