Bug 267876
| Summary: | REGRESSION (iOS 17?): Adding or removing scroll-snap-align: none causes scroll position to jump backwards or forwards | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | amandabugreports |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, nmouchtaris, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 17 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 17 | ||
amandabugreports
When using a scroll-snap container with at least three children ("slides"), if the container is scrolled to at least the second slide, and scroll-snap-align: none is added to or removed from the slide before it, the scroll position of the container will jump.
Steps to reproduce:
1. Open test case on a mobile device running iOS 17: https://codepen.io/amandaesmith3/pen/ExMmrQo
2. Wait half a second so the scroll position of the container moves to slide 2, due to the included setTimeout.
3. Click the "disable first slide" button, which adds scroll-snap-align: none to slide 1.
4. Observe that the container's scroll position jumps to slide 3.
5. Click the "scroll to middle" button, which moves the scroll position back to slide 2.
6. Click the "enable first slide" button, which removes scroll-snap-align: none from slide 1.
7. Observe that the container's scroll position jumps to slide 1.
Expected behavior: The scroll position of the container should not change when adding or removing scroll-snap-align: none on slide 1.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
amandabugreports
This looks to be a regression in iOS 17.
Radar WebKit Bug Importer
<rdar://problem/121466225>