Re: [csswg-drafts] [css-scroll-snap-2] Should scrollsnapchanging target the currently visible element during flings (#10838)

> animation-timeline: view() is maybe closer to what they're using too

Right, this would produce the expected behavior for flings, but it would mean that clicking on an anchor link, e.g. the 5 in my [demo](https://codepen.io/flackr/pen/zYVyvLp) would also slowly step through each element, delaying the feedback that you have selected the 5th page. For targeted scrolls, it makes sense that the user has an expectation about where it is going and so expects immediate feedback about the target location.

I have two main concerns about predicting the fling:
- It's not continuous. The instant you lift your finger to start the fling the `snapchanging` target immediately shifts to something many elements away from it. This discontinuity gives me the impression that there was a bug or unexpected jump.
- Unlike targeted scrolls, for momentum scrolls the user usually doesn't understand where they've scrolled to, and it's a fairly chaotic location (subject to minor differences in fling speed).

I'll prototype something up to make it easy to compare the two which I think will help with deciding on one of three outcomes:
1. Fling momentum prediction is better, we should ensure it is spec'd.
2. Not predicting fling momentum scrolls is better, we should change chrome
3. Each has their use cases. We should figure out how an author should choose they want.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10838#issuecomment-2334229972 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 6 September 2024 14:49:05 UTC