DescriptionDisable scroll anchoring if the user engages in a drag motion
This CL adds a heuristic for disabling scroll anchoring when a user is
interacting with a page, specifically clicking and dragging for panning.
With this CL:
Scroll anchoring is disabled if we see a pointermove while a pointer is down.
Scroll anchoring is re-enabled when the scroll offset is changed (via userscroll,
programmaticscroll, etc)
This logic breaks scroll anchoring in the following cases:
1) Because scroll anchoring is disabled from when we see the first pointermove
until the next scroll, we don't see its advantages on some pages. For example,
if the the user is panning a map in the viewport and content shifts above them.
2) If the user clicks, drags, and releases the mouse pointer on desktop. Unlike in the
case of touch, clicking and dragging doesn't cause a scroll. As a result, scroll
anchoring is not re-enabled and we are left without scroll anchoring until the
next scroll. This could happen for cases involving text selection? Perhaps this is
also a problem on touch.
3) Edge case: Lets say there is page with a map on it with a janky MT. If the
user scrolls the page (on CC) and starts to interact with the map, we will re-enable
scroll anchoring after the CC scroll offset syncs with MT scroll offset and before the
user stops panning the page, resulting on the original bug.
BUG=628074
Patch Set 1 #Patch Set 2 : simplify #Patch Set 3 : remove irrelevant comment #
Total comments: 1
Messages
Total messages: 6 (2 generated)
|