Bug 185104 - [css-scroll-snap][css-position-sticky] When currently sticking elements normal flow is beyond scrollports "fold" scroll-snap-align doesn't calculate correctly
Summary: [css-scroll-snap][css-position-sticky] When currently sticking elements norma...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-27 20:19 PDT by jonjohnjohnson
Modified: 2019-01-30 14:01 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonjohnjohnson 2018-04-27 20:19:15 PDT
Expected:
"Normal flow" geometry is always used from a scroll-snap-align set element, even if it has sticky position scheme.

Observed:
Scenario where snapping scroller doesn't register children's normal flow snap alignments, if position:sticky "sticks" them into the scrollport towards the scrolling start edge, meaning their normal flow is passed the scrollport's "fold"?

1. Navigate to testcase -> https://jsfiddle.net/bzantvmk/
2. Scroll horizontally, notice how the scroller only snaps to the beginning and end.
3. Alter the 'position' of '.panel' blocks to 'static' and see snapping work correctly for each panel in the scroller.

In most my mixing of scroll-snap and sticky, alignment is calculated correctly, but this is a case where it's completely broken.

cc wenson_hsieh@apple.com
Comment 1 jonjohnjohnson 2018-08-07 12:59:29 PDT
wenson_hsieh@apple.com Don't want to bug, but just wondering if this was ever triaged and reproduced?
Comment 2 Radar WebKit Bug Importer 2018-08-07 13:12:32 PDT
<rdar://problem/43015593>
Comment 3 Wenson Hsieh 2018-08-07 13:15:02 PDT
(In reply to jonjohnjohnson from comment #1)
> wenson_hsieh@apple.com Don't want to bug, but just wondering if this was
> ever triaged and reproduced?

Sorry for the delay — I'm still able to reproduce this on the latest macOS Mojave beta.
Comment 4 jonjohnjohnson 2018-08-07 13:20:51 PDT
Here is a video of the snapport not calculating any of the snap positions correctly and only snapping to the beginning and ends of the scroll.

http://cl.ly/1h280g262V1D

Again, if you cause a re-layout by altering the position, snap positions get calculated correctly. But not on initial layout.
Comment 5 jonjohnjohnson 2019-01-30 14:01:53 PST
fred.wang@free.fr When looking into how "scroll snap offsets" are created in https://bugs.webkit.org/show_bug.cgi?id=191816 I wonder if you any insight into this quite similar issue?