Bug 158821

Summary: Scroll snapping not working for 2 elements
Product: WebKit Reporter: Sriram Krishnan <sriramkrish85>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Critical CC: bfulgham, dvoytenko, fred.wang, simon.fraser, sriramkrish85, timothy003, wenson_hsieh
Priority: P1    
Version: Safari 9   
Hardware: All   
OS: All   
Description Flags
Testcase none

Description Sriram Krishnan 2016-06-15 17:08:12 PDT
When i try to use -webkit-scroll-snap-type: mandatory on a container and -webkit-scroll-snap-coordinate: 0 0 on its children, it does not work when there are only 2 elements in the container. 

Here is the URL for my demo  - http://output.jsbin.com/fegace

I found that i could work around this by adding 2 dummy 1px elements on either side of the actual elements and make this sort of work. 
Workaround - http://output.jsbin.com/zitifuy
Comment 1 Sriram Krishnan 2016-08-05 17:37:46 PDT
Hi any updates on when this would be fixed?
Comment 2 Frédéric Wang (:fredw) 2018-02-21 08:26:40 PST
Created attachment 334380 [details]

This is a reduced testcase without -webkit prefix and using the new values described in the latest Working Draft (https://drafts.csswg.org/css-scroll-snap/). The snapping works as expected with the iOS simulator (both the latest release and trunk).
Comment 3 Frédéric Wang (:fredw) 2018-04-11 22:50:51 PDT
According to AMP developers, this bug is fixed in iOS 11.3