[Webkit-unassigned] [Bug 238497] New: REGRESSION: CSS scroll-behavior: smooth with overflow: hidden breaks JS scrollTo/scrollLeft/scrollTop

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 29 02:26:33 PDT 2022


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

            Bug ID: 238497
           Summary: REGRESSION: CSS scroll-behavior: smooth with overflow:
                    hidden breaks JS scrollTo/scrollLeft/scrollTop
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: All
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Scrolling
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: peter at hotelmeister.com
                CC: simon.fraser at apple.com

Hello,

This issue was introduced in Safari 15.4 and occurs on macOS and iOS.


Description:

When a scroll container has overflow: hidden; and scroll-behavior: smooth; set then scrolling via JavaScript using either scrollTo method or setting scrollLeft / scrollTop directly fails silently. 

No error is shown in the console and the scroll container does not scroll. This applies to both horizontal and vertical scrolling.

Reproduction:
1) Open one of the samples:
horizontal scroll: https://jsfiddle.net/hmpeda/x2uhdn7z/3/
vertical scroll: https://jsfiddle.net/hmpeda/tz6jb7es/11/

2) click on the links below the red box (left / right respective up /down)

If you open the same examples on Safari 15.3 the scroll is working, silently ignoring the unsupported scroll-behavior: smooth; CSS attribute (which was only added in Safari 15.4).

When using the scrollTo method with the option behavior: smooth (instead of the CSS), the behavior is exactly the same.

When you remove scroll-behavior: smooth; CSS attribute, it is working the same way as it did in Safari 15.3 (but breaking smooth scrolling for all other browsers which do support scroll-behavior CSS attribute)


Expected Behavior:

JavaScript scrollTo/scrollLeft/scrollTop should be executed, as it did in all previous versions and as it does in all other major browsers.


Actual Behavior:

Scroll fails silently, no errors in the console, the scroll is just not executed.


In case you need any additional information, please let me know.


Peter

-- 
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/20220329/650a03a6/attachment.htm>


More information about the webkit-unassigned mailing list