[Webkit-unassigned] [Bug 228686] New: scroll-snap-stop: always behaves like scroll-snap-stop: normal when using smooth scrolling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 31 20:47:29 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=228686

            Bug ID: 228686
           Summary: scroll-snap-stop: always behaves like
                    scroll-snap-stop: normal when using smooth scrolling
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: iPhone / iPad
                OS: iOS 14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Scrolling
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon at rollingrazor.com
                CC: simon.fraser at apple.com

I have a horizontal image carousel with five images and five navigation buttons.
The slides are each 100vw in width and positioned with scroll-snapping.

I am using iOS 15 Beta 4 and I have enabled 'CSSOM View Smooth Scrolling' under Experimental WebKit Features.


/* partial css */
#gallery {

    scroll-snap-type: x mandatory;

    display: flex;
}

.slide {

    scroll-snap-align: center;
    scroll-snap-stop: normal;

    min-width: 100vw;   
    width: 100vw;
}

The scrolling is triggered programatically when clicking a button using:

document.getElementById('gallery').scrollTo({ left: offset, behavior: 'smooth' });   // offset is x position of n'th slide


If I click to go from slide 1 > slide 5 then that obviously passes over all the snap stops in between.

Then what happens is Safari abruptly stops on the second slide's snap point (the first it reaches).

The behavior is exactly what I would expect from:
scroll-snap-stop: always 

This is not supposed to happen with scroll-snap-stop: normal 
https://www.w3.org/TR/css-scroll-snap-1/#scroll-snap-stop

Demo pending.

Similar bug:
https://bugs.webkit.org/show_bug.cgi?id=145330
https://bugs.webkit.org/show_bug.cgi?id=223406

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210801/ef4a1366/attachment-0001.htm>


More information about the webkit-unassigned mailing list