Closed Bug 1707348 Opened 3 years ago Closed 3 years ago

overscroll stuck with vertical scrolling inside horizontally scrollable element inside fixed pos

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
firefox89 --- wontfix
firefox90 --- verified

People

(Reporter: tnikkel, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file fgs3.html

Load testcase.
Put your mouse cursor over the grey box inside the horizontally scrollable element.
Fling to bottom of page, and do another fling while page is in overscroll.
The overscroll gets stuck.

Severity: -- → S3
Priority: -- → P2
Blocks: overscroll-90
No longer blocks: overscroll-post

With the original STR in comment 0, it's hard to reproduce the issue on the current nightly, I guess it's because of bug 1705280.

Another STR I found is; try to horizontal rightward scrolling by pan gesture during the root page is overscrolling.

I think the original issue in comment 0 has been fixed by bug 1705280 and bug 1709723 (I will describe the reason later) but the case in comment 1, second horizontal pan case, isn't fixed. I am going to describe what's going on the second case.

  1. Vertical overscrolling happens on the root APZC triggered by pan end or pan momentum end
  2. An overscroll animation start
  3. Given that during running the animation or when the animation starts all queued pan events have been processed
  4. A new horizontal pan start event happens on the subframe , thus we tries to cancel all overscroll animations in the overscroll handoff chain which is including the root APZC

I wonder whether we need to cancel (overscroll) animations on APZCs which are in the later chain than the block's target APZC. To me it seems not.

As for the original case, second and later pan events on the subframe are handed off to the root APZC because the subframe is not scrollable vertically, then the root APZC generates a new overscroll animation properly.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #2)

  1. A new horizontal pan start event happens on the subframe , thus we tries to cancel all overscroll animations in the overscroll handoff chain which is including the root APZC

I wonder whether we need to cancel (overscroll) animations on APZCs which are in the later chain than the block's target APZC. To me it seems not.

I think that is the correct behaviour: we don't want the root overscroll animation to proceed (be sampled) while a subframe is being panned. (One reason is that the root overscroll animation would move the subframe content under the user's finger.)

On pan-end / pan-momentum-end, however, we should check the entire chain for overscrolled APZCs and start animations where appropriate. We do this in some places using SnapBackOverscrolledApzc.

It makes sure that overscroll animations which have been cancelled by this pan
gesture will restart again.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Attachment #9221498 - Attachment description: Bug 1707348 - Call SnapBackOverscrolledApzc instead of StartOverscrollAnimation in OnPanEnd. r?botond → Bug 1707348 - Call SnapBackOverscrolledApzcForMomentum instead of StartOverscrollAnimation in OnPanEnd. r?botond
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7942f7307ab
Call SnapBackOverscrolledApzcForMomentum instead of StartOverscrollAnimation in OnPanEnd. r=botond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Verified fixed on the latest version of Firefox Nightly 90.0a1 (2021-05-20) on MacOS 11.2.3.
Updating the flag for beta to affected in the hopes that the fix will be uplifted to beta.

The patch landed in nightly and beta is affected.
:hiro, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(hikezoe.birchill)
Status: RESOLVED → VERIFIED
Flags: needinfo?(hikezoe.birchill)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: