Bug 1905247 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I think our logic is taking the `scroll-snap-align:start` too seriously.

We seem to be refusing to advance the scroll position unless we're advancing it by a particular threshold, where the threshold is: enough to make the second `scroll-snap-align:start` item flush with the start of the scroller (which is the `200px - 201px` boundary in this testcase; that explains why that distance is the magic number for us)

This makes sense in general, but it **doesn't seem to make sense** in this specific case where our scrollable overflow (and `scrollLeftMax`) is smaller than that threshold, and so we literally can't scroll by 200px.  Requiring a scrollLeft of 201px to advance up to a much-smaller maximum scrollLeft value seems wrong.

It seems like other browsers have special handling for this case and their scroll threshold is `min(scroll-snap-align-threshold, 0.5*scrollLeftMax)`, or something like that, so that scrolling to the `scrollLeftMax` value (or something more than halfway to it) will get you to the maximum scroll position instead of having no effect.
I think our logic is taking the `scroll-snap-align:start` too seriously.

We seem to be refusing to advance the scroll position unless we're advancing it by a particular threshold, where the threshold is: enough to make the second `scroll-snap-align:start` item flush with the start of the scroller (which is the `200px vs. 201px` boundary in this testcase; that explains why that distance is the magic number for us)

This makes sense in general, but it **doesn't seem to make sense** in this specific case where our scrollable overflow (and `scrollLeftMax`) is smaller than that threshold, and so we literally can't scroll by 200px.  Requiring a scrollLeft of 201px to advance up to a much-smaller maximum scrollLeft value seems wrong.

It seems like other browsers have special handling for this case and their scroll threshold is `min(scroll-snap-align-threshold, 0.5*scrollLeftMax)`, or something like that, so that scrolling to the `scrollLeftMax` value (or something more than halfway to it) will get you to the maximum scroll position instead of having no effect.
I think our logic is taking the `scroll-snap-align:start` too seriously.

We seem to be refusing to advance the scroll position unless we're advancing it by a particular threshold, where the threshold is: enough to make the second `scroll-snap-align:start` item flush with the start of the scroller (which is the `200px vs. 201px` boundary in this testcase; that explains why that distance is the magic number for us)

This makes sense in general, but it **doesn't seem to make sense** in this specific case where our scrollable overflow (and `scrollLeftMax`) is smaller than that threshold, and so we literally **can't scroll by `200px` or by `201px` or anything close to it**.  The fact that we require a `scrollLeft = 201px` in order to actually be able to advance the scroll position to a much smaller value seems wrong.

It seems like other browsers have special handling for this case; it looks like their scroll threshold is `min(scroll-snap-align-threshold, 0.5*scrollLeftMax)` (i.e. `min(200px,50px)` for this testcase) -- or something like that.  This means that scrolling to the `scrollLeftMax` value (or something more than halfway to it) -- e.g. anything from 51px-100px in these testcases -- will get you to the maximum scroll position in those browsers.
It seems like we're applying the `scroll-snap-align:start` scrolling restriction too strictly.

We seem to be refusing to advance the scroll position unless we're advancing it by a particular threshold, where the threshold is: enough to make the second `scroll-snap-align:start` item flush with the start of the scroller (which is the `200px vs. 201px` boundary in this testcase; that explains why that distance is the magic number for us)

This makes sense in general, but it **doesn't seem to make sense** in this specific case where our scrollable overflow (and `scrollLeftMax`) is smaller than that threshold, and so we literally **can't scroll by `200px` or by `201px` or anything close to it**.  The fact that we require a `scrollLeft = 201px` in order to actually be able to advance the scroll position to a much smaller value seems wrong.

It seems like other browsers have special handling for this case; it looks like their scroll threshold is `min(scroll-snap-align-threshold, 0.5*scrollLeftMax)` (i.e. `min(200px,50px)` for this testcase) -- or something like that.  This means that scrolling to the `scrollLeftMax` value (or something more than halfway to it) -- e.g. anything from 51px-100px in these testcases -- will get you to the maximum scroll position in those browsers.

Back to Bug 1905247 Comment 3