Closed Bug 1847305 Opened 1 year ago Closed 10 months ago

Subsequent upward scroll events end up blocked on pages with active touchmove or touchstart handlers

Categories

(Fenix :: Browser Engine, defect, P2)

All
Android
defect

Tracking

(firefox122 verified)

VERIFIED FIXED
122 Branch
Tracking Status
firefox122 --- verified

People

(Reporter: bas.schouten, Assigned: jonalmeida)

References

()

Details

Attachments

(1 file)

When scrolling up on pages that have a touchmove or touchstart handler, every motion scrolling up following a subsequent successful scroll motion is ignored, this is quite frustrating when moving upward deliberately. I've included a minimal testcase.

STR:

  1. Scroll down on the page
  2. Make any scrolling motion on the page
  3. Scroll up again, make sure your finger begins moving down when it touches the screen

The bug may seem more randomly intermittent due to accidentally scrolling down very briefly before scrolling up, in which case it will work. It is important to ensure the touch motion begins in a downward direction (i.e. for scrolling up).

This issue does not occur when pull-to-refresh is disabled.

Adding one detail: it's important for the touchmove/touchstart listener to be passive: false to trigger the bug.

I did rule out issues on the APZ side. (The passive: false event listener means that APZ provides the InputResult to GeckoView using the "delayed result" codepath rather than the "eager result" codepath, but the provided value is correct.)

The mechanism of failure is that for the scroll gestures that have no effect, APZ receives a touch-cancel event from GeckoView which cancels the gesture. (This is the same thing I observed in bug 1807075 comment 6, though in that case the touch-cancel events were related to Android's "tap to magnify" feature; that's not the case here, the issue occurs with "tap to magnify" disabled as well.)

An example of a production website affected by this bug is https://diverace.com/. This is likely to affect a variety of sites because the condition for triggering the bug (having a passive: false touchstart/touchmove event listener) is a common pattern.

I would suggest a severity of S2 for this; even though there is technically a workaround (try the scroll gesture again and it works the second time), the issue is quite noticeable (basically every other upwards scroll gesture fails), affects a core interaction mechanism (scrolling), and is triggered by a common code pattern used on a variety of websites.

The symptoms are very similar to bug 1830805, which Hiro has identified (in bug 1830805 comment 3) as being fixed by a workaround for bug 1724755, making me wonder if this is also related to bug 1724755.

See Also: → 1830805
See Also: → 1832880
See Also: → 1841981
See Also: → 1845056

The severity field is not set for this bug.
:jonalmeida, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jonalmeida942)
Severity: -- → S2
Flags: needinfo?(jonalmeida942)
Priority: -- → P2

Hiro's investigation and patch in bug 1832880 are quite similar to my own (limited) investigation and will possibly solve this bug. Taking this on to work on it and verify if that's the case.

I suspect the changes in the 1.1.0 of the SwipeRefreshLayout have changed the behaviour of how we are handling touch events and using SwipeRefreshLayout#setLegacyRequestDisallowInterceptTouchEventEnabled(boolean) may work in this reduced test case, but is not a solution at the same time.

Assignee: nobody → jonalmeida942
Status: NEW → RESOLVED
Closed: 10 months ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

\o/

Verified on the latest Fenix Nightly 122.0a1 from 12/8 with Samsung Galaxy Note 8 (Android 9), and Google Pixel 6 (Android 14).
The scrolling on https://diverace.com/, and text https://faraday.basschouten.com/mozilla/scrollingtest.html work as expected.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1832880
Blocks: 1831349
Blocks: 1830805
Blocks: 1841981
Regressions: 1872170
Blocks: 1845056
See Also: 1845056
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: