WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
183157
[scroll-snap] scrolling against edge of iframe results in incorrect behavior
https://bugs.webkit.org/show_bug.cgi?id=183157
Summary
[scroll-snap] scrolling against edge of iframe results in incorrect behavior
jonjohnjohnson
Reported
2018-02-26 20:26:41 PST
Could also be related to this bug on ios ->
https://bugs.webkit.org/show_bug.cgi?id=135997
Here's a video showcasing the behavior described that issue ->
http://cl.ly/pmvP
But for this issue... On both safari 11 and technology preview 50, at least when document is within an iframe, starting a scroll in the direction towards the edge that is already been reached makes the scroll fly all the way to the opposite edge when just trying to go to next snap position. Steps to reproduce: 1. Go to this url ->
http://jsbin.com/subojom/8/edit?html,css,js,output
2. Scroll further up the output panel and without releasing (flinging) change your scroll direction (even a slight amount) 3. Notice the container scroll scroll (all too quickly) to the other end of itself. 4. Behaves like this when performed from the bottom edge as well. Here's a video showcasing this issue ->
http://cl.ly/pnD0
Attachments
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2018-02-26 20:35:50 PST
The iOS bug is a result of UIScrollView behavior, and isn't related to what you're seeing here. On STP 50 running against macOS 10.13.4, I can reproduce this if I scroll downwards with any momentum while rubber-banding against the top edge of the scroll container. However, if I just let go without any momentum (i.e. without flinging) the scroll position rests at the top as expected.
Wenson Hsieh
Comment 2
2018-02-26 20:44:29 PST
Can you reproduce the bug with the same steps in main frame scrolling, and/or overflow scrolling? (e.g.
https://whsieh.github.io/examples/scroll-snap-mainframe
and
https://whsieh.github.io/examples/scroll-snap-overflow
, respectively).
jonjohnjohnson
Comment 3
2018-02-26 21:06:21 PST
I could not reproduce the bug with the same steps in either... -
https://whsieh.github.io/examples/scroll-snap-mainframe
-
https://whsieh.github.io/examples/scroll-snap-overflow
Which led me to put both of those test case requests inside an iframe, and alas a wild bug appeared. For the mainframe example, it completely disabled scroll-snapping. For the overflow example, it reproduced the original described issue of this post.
Wenson Hsieh
Comment 4
2018-02-26 21:08:12 PST
Got it — thanks for the information!
jonjohnjohnson
Comment 5
2018-02-26 21:14:10 PST
Should I file another bug for the not snapping at all issue shown when the mainframe example is within an iframe?
Wenson Hsieh
Comment 6
2018-02-26 21:15:53 PST
(In reply to jonjohnjohnson from
comment #5
)
> Should I file another bug for the not snapping at all issue shown when the > mainframe example is within an iframe?
Sure — though, I suspect these behaviors may have the same or similar root cause. If that is the case, we can dupe the other bug back to this one.
Martin Robinson
Comment 7
2021-07-07 08:28:49 PDT
I can't seem to reproduce this bug any longer in the iOS simulator nor in Safari.
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