Touch gesture can scroll the page during ongoing swipe by pan gesture
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: canalun, Unassigned)
References
Details
While a touchpad swipe-to-navigate gesture is in progress (fingers still on the touchpad), touchscreen input can still scroll the page.
The other order already works. During a touchscreen swipe, touchpad pan events are consumed by the SwipeTracker before they reach APZ, so they neither scroll the page nor interrupt the swipe (https://phabricator.services.mozilla.com/D336896).
Also, see test_touchscreen_input_does_not_interrupt_ongoing_touchpad_swipe in widget/tests/browser/browser_test_touchscreen_swipe_gesture_with_pan_gesture.js.
Steps to reproduce:
- On a device with both a touchscreen and a touchpad, open a page that has a previous history entry and is scrollable horizontally, with the page at its left edge.
- Start a back swipe with two fingers on the touchpad and keep them there.
- While the touchpad swipe is in progress, drag one finger on the touchscreen from right to left.
Expected:
The touchscreen input does not scroll the page while the touchpad swipe is in progress, the same way touchpad input does not scroll during a touchscreen swipe.
Actual:
The page scrolls.
Cause:
For touchpad input, the widget gives SwipeTracker::ProcessEvent() the event first. If the tracker consumes it, APZ never sees it. On the other hand, for touchscreen input, the widget passes the event to APZ first, and only then runs the swipe handling.
Memo: There are some approaches.
a. While a touchpad swipe is in progress, drop the whole touch block (from MULTITOUCH_START to END/CANCEL) before it reaches APZ. This needs state to keep dropping the block even if the touchpad swipe ends partway through, and the touch counts in TouchSwipeState and APZ have to stay consistent.
b. Make APZ wait for the browser gesture response for touch blocks that start during a touchpad swipe. Content still gets touch events, but this changes APZ and delays touch scrolling while waiting.
| Reporter | ||
Comment 1•12 days ago
|
||
Set P3/S3, because it doesn't seem usual to touch the screen and try to scroll the page during ongoing pan swipe.
Description
•