Bug 264850 - Incorrect scroll snap behavior with this example
Summary: Incorrect scroll snap behavior with this example
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-14 17:39 PST by Simon Fraser (smfr)
Modified: 2024-02-05 00:56 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2023-11-14 17:39:18 PST
https://github.com/w3c/csswg-drafts/issues/9187 points to this nested snap point example:
https://flackr.github.io/web-demos/css-scroll-snap/nested/sections.html

In Safari, I get no scroll snapping at all on that page. Firefox does snapping.
Comment 1 Radar WebKit Bug Importer 2023-11-14 17:39:40 PST
<rdar://problem/118428551>
Comment 2 Guido Bouman 2024-02-04 13:58:06 PST
For me Safari 17.1 does perform some form of scroll snapping, but incorrectly. 

There at least two issues:
- The end of the scrollable region snaps back to the last scroll anchor, making the last bit of content unreachable.
- When scroll back from end end to the start, the whenever a scroll anchor come into view, Safar snaps to the top of the element, instead of snapping to the bottom as explained in example #9 of the spec: https://drafts.csswg.org/css-scroll-snap-1/#example-e9209b74
Comment 3 Guido Bouman 2024-02-04 13:59:21 PST
Chromium has implemented the correct behavior, Firefox is similar to Safari, and has an open bug.
Comment 4 Guido Bouman 2024-02-05 00:56:43 PST
CSSWG Decision (https://github.com/w3c/csswg-drafts/issues/6863#issuecomment-1854300040):
> any postion within the overlarge snap area is a valid snap position, as defined in the (clarified) spec