Closed Bug 1179453 Opened 9 years ago Closed 9 years ago

"scroll-snap-type: mandatory" momentum can be interrupted, causing elements to land at incorrect scroll offsets

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1190469
blocking-b2g 2.5?

People

(Reporter: mcav, Assigned: kats)

References

Details

Attachments

(1 file)

Attached file Simple HTML test case
When using "scroll-snap-type: mandatory", it is possible/easy to interrupt the scrolling momentum, which causes the element to land on a non-scroll-snapped offset.

This can be demonstrated using the attached simple HTML test case on a touch device, and is also seen in the FxOS task manager (which uses scroll-snap to swipe between open apps).

STR:

1. Swipe (and lift your finger) to cause scroll-snap momentum to kick in.
2. Before the momentum stops, tap quickly anywhere in the scroll-snap element. (i.e. tap, without moving your finger, as though you are interrupting the momentum).
3. Observe that with the momentum stopped, the element does not attempt to scroll to a mandatory scroll offset, and instead rests in between snapping points.

If the steps above are unclear, I can provide video and/or more detailed STR.
Flags: needinfo?(kgilbert)
(In reply to Marcus Cavanaugh [:mcav] (Mozilla SF) from comment #0)
> Created attachment 8628413 [details]
> Simple HTML test case
> 
> When using "scroll-snap-type: mandatory", it is possible/easy to interrupt
> the scrolling momentum, which causes the element to land on a
> non-scroll-snapped offset.
> 
> This can be demonstrated using the attached simple HTML test case on a touch
> device, and is also seen in the FxOS task manager (which uses scroll-snap to
> swipe between open apps).
> 
> STR:
> 
> 1. Swipe (and lift your finger) to cause scroll-snap momentum to kick in.
> 2. Before the momentum stops, tap quickly anywhere in the scroll-snap
> element. (i.e. tap, without moving your finger, as though you are
> interrupting the momentum).
> 3. Observe that with the momentum stopped, the element does not attempt to
> scroll to a mandatory scroll offset, and instead rests in between snapping
> points.
> 
> If the steps above are unclear, I can provide video and/or more detailed STR.
Thanks for spotting this Marcus.

The intended behavior is that the scroll snapping can be interrupted by a touch gesture; however, releasing the touch gesture should resume the scroll snapping and never leave the scroll position in-between snap points.
Flags: needinfo?(kgilbert)
I have reproduced this.  It appears that we aren't re-establishing the scroll snapping after a tap (only after flings).  I can take this one.
Assignee: nobody → kgilbert
See Also: → 1211730
[Blocking Requested - why for this release]:

This shows up very clearly in the new gaia homescreen (bug 1211730).
blocking-b2g: --- → 2.5?
kip, any chance for getting this done in 44?
Flags: needinfo?(kgilbert)
See Also: → 1190469
(In reply to Andrew Overholt [:overholt] from comment #4)
> kip, any chance for getting this done in 44?

I am not likely to have a fix ready in time for 44 as I am currently on the critical path for my current work with WebVR shipping in 44.  After that, I will gladly revisit this.
Flags: needinfo?(kgilbert)
Bug 1190469 might fix this.
Indeed, this is basically the same issue as that. I'll take this since I'm looking into that as well.
Assignee: kgilbert → bugmail.mozilla
The patches I just posted to bug 1190469 fix this issue as well.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
See Also: 1190469
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: