Closed Bug 1848917 Opened 1 year ago Closed 5 days ago

Scroll-snap on screen-height blocks results in slow, broken, non-snapped scrolling

Categories

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

Firefox 116
defect

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox117 --- wontfix
firefox118 --- wontfix
firefox119 --- wontfix
firefox132 --- wontfix
firefox133 --- wontfix
firefox134 --- fixed

People

(Reporter: Nick, Assigned: hiro)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

Repeatedly scroll forward and backward through the scroll snap slides at either the Codepen or JSFiddle below.

https://jsfiddle.net/kn7vgLht/
https://codepen.io/argyleink/pen/jOzGJej

Actual results:

After a few transitions, intermittent freezing mid-transition occurs. It then requires several scroll actions to proceed, far more than would be needed even with unsnapped blocks.

Screen-recorded demonstration: https://youtu.be/LzncbRONy5E

NOTE: Similar but not identical janky behavior occurs on Firefox for Android as well, so this problem may not be due to PC-specific code.

Expected results:

It should have transitioned fully and smoothly between every pair of slides with only one scroll event.

Note: I have also experienced this same bug in Windows on this same PC, so it is not a Linux-specific issue.

More details than can be fit into the format of a bug report can be found on my SO post.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core

CORRECTION:

The JSFiddle used incorrect CSS. Here is the corrected JSFiddle.

The Codepen was correct. The bug is still present in both after correction.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)

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

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)

The issue happens when we received a new wheel event while a Smooth(Msd) animation triggered by scroll-snap is running. So what happens exactly is;

  1. A wheel event happens
  2. The event triggers a Smooth(Msd) animation here and its destination is 600, for example
  3. A new wheel event happens during the animation is running
  4. Since bug 1780701, we don't return valid snap position from this MaybeAdjustDeltaForScrollSnappingOnWheelInput call because the destination (600) is same
  5. Then unfortunately due to the Smooth(Msd) animation, mState is not WHEEL_SCROLL, thus we fall into this if block use initialPosition which is not factored into the previous animation state

So probably we need to tell whether there's the previous smooth animation triggered by the previous snap, and if there is, we need to bail out.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Component: Layout: Scrolling and Overflow → Panning and Zooming
Ever confirmed: true
Flags: needinfo?(hikezoe.birchill)
Priority: -- → P3

Set release status flags based on info from the regressing bug 1780701

:hiro any plan on working on this or should we stop tracking it?

Flags: needinfo?(hikezoe.birchill)

Yeah we should stop tracking, it's not a recent regression and I don't have cycles to work on this soon.

Flags: needinfo?(hikezoe.birchill)

I think this bug has been fixed by bug 1922904.

Depends on: 1922904

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

I think this bug has been fixed by bug 1922904.

Bless and thank you!

(I forgot closing)

Status: NEW → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Assignee: nobody → hikezoe.birchill
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: