WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
221240
Applying scroll-snap-type resets scroll position to 0
https://bugs.webkit.org/show_bug.cgi?id=221240
Summary
Applying scroll-snap-type resets scroll position to 0
Philip Fulgham
Reported
2021-02-01 19:12:08 PST
Created
attachment 418951
[details]
Minimal code reproduction I've come across what I *believe* is a bug in Safari (both macOS and iOS) with the scroll-snap-type CSS property. If I apply a scroll-snap-type property using JavaScript to an element that didn't already have it, the element's scroll position resets to 0. This contrasts with Chromium, in which the element's scroll position just jumps to the nearest snap point, which seems to be the more logical behavior. This may be related to
bug #214232
in some way, but this issue seemed slightly different (as acknowledged by a comment on that bug) and easier to reproduce, so I thought maybe it should be filed separately. I've attached a minimal code reproduction. The seemingly bugged behavior occurs for me in Safari 13, 14, and TP.
Attachments
Minimal code reproduction
(1.06 KB, text/html)
2021-02-01 19:12 PST
,
Philip Fulgham
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-02-08 19:13:13 PST
<
rdar://problem/74125149
>
Martin Robinson
Comment 2
2021-07-07 07:51:29 PDT
As far as I can tell this is now working in the latest from the repository as well as the latest Safari Technology Preview. Some other fix must have corrected this error. I'm going to close this, but please reopen if you can still reproduce it. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug