Bug 243452 - Overscroll Behavior not respecting elements with no overflowing content
Summary: Overscroll Behavior not respecting elements with no overflowing content
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-02 07:08 PDT by kari.pihkala
Modified: 2024-06-07 09:12 PDT (History)
5 users (show)

See Also:


Attachments
overscrollbehavior.html (1.30 KB, text/html)
2022-08-02 07:08 PDT, kari.pihkala
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kari.pihkala 2022-08-02 07:08:49 PDT
Created attachment 461359 [details]
overscrollbehavior.html

In Safari, the overscroll-behavior CSS property doesn't have any effect when the overflow property is set to "auto", "hidden" or "scroll" and when the content doesn't overflow. The overscroll-behavior CSS property should affect the scrolling behavior even if the content doesn't overflow.

Steps to reproduce:

1. Open the attached overscrollbehavior.html on a desktop browser.
2. Move the mouse cursor over the white box on the right side.
3. Try to scroll the white box with two finger scrolling.

Expected behavior: Nothing should happen. The underlying page with the blue "Main" texts should not scroll.

Actual behavior: The underlying page with the blue "Main" texts is scrolled.

Note that the gray box on the left side behaves correctly. Scrolling it with the two finger scrolling only scrolls the black "Left" texts. The blue "Main" texts are never scrolled.

Chrome 103 has the same bug https://bugs.chromium.org/p/chromium/issues/detail?id=813094
Firefox has the same issue, but no one has filed a bug for it.

Tested on Safari Technology Preview 149 (Safari 16.0, WebKit 17614.1.19.1.5) with the experimental CSS Overscroll Behavior feature enabled.
Comment 1 Radar WebKit Bug Importer 2022-08-09 07:09:17 PDT
<rdar://problem/98381693>
Comment 2 Simon Fraser (smfr) 2024-06-07 09:12:19 PDT
To implement this we’d have to represent non-scrollable boxes with overscroll-behavior:contain in the scrolling tree, which is a fair amount of work.