Bug 233084 - Scroll through content hidden with clip-path does not propagate below
Summary: Scroll through content hidden with clip-path does not propagate below
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-13 06:57 PST by Bruno Stasse
Modified: 2023-01-25 10:14 PST (History)
6 users (show)

See Also:


Attachments
testcase (1.78 KB, text/html)
2021-11-13 06:57 PST, Bruno Stasse
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Stasse 2021-11-13 06:57:25 PST
Created attachment 444137 [details]
testcase

When clip-path is applied to an element, the content below the clipped part of the element cannot be scrolled, instead nothing happens.

See the attachment.

Scrolling below the purple square should trigger scroll underneath, but nothing happens. Note that other events (CSS hover and click) seem to work fine.
Comment 1 Simon Fraser (smfr) 2021-11-15 14:35:51 PST
This might be bug 214367
Comment 2 Radar WebKit Bug Importer 2021-11-20 06:58:26 PST
<rdar://problem/85634077>
Comment 3 Bruno Stasse 2023-01-20 03:30:05 PST
Is there any update on this? This is a pretty bad bug and a substantial issue for me.
Comment 4 Simon Fraser (smfr) 2023-01-20 14:32:26 PST
Pull request: https://github.com/WebKit/WebKit/pull/8896
Comment 5 Satoshi Onoda 2023-01-22 20:39:20 PST
@Bruno Stasse 

I've encountered exactly the same problem and found a strange solution.
Adding a wheel event to the clipped element somehow solves this.

https://codepen.io/satoshionoda/pen/yLqvXrW

I suppose this is quite hacky but can be used until this bug is completely solved.
Comment 6 Simon Fraser (smfr) 2023-01-23 11:25:29 PST
(In reply to Satoshi Onoda from comment #5)
> @Bruno Stasse 
> 
> I've encountered exactly the same problem and found a strange solution.
> Adding a wheel event to the clipped element somehow solves this.
> 
> https://codepen.io/satoshionoda/pen/yLqvXrW
> 
> I suppose this is quite hacky but can be used until this bug is completely
> solved.

That makes sense because wheel event handlers kick WebKit off of the fast path.
Comment 7 Bruno Stasse 2023-01-24 03:13:56 PST
Ha that's quite interesting, thank you Satoshi Onoda! Unfortunately I need it to work on iOS, and there is no wheel events there so it doesn't work.

If anyone has another workaround for iOS it would be very much welcome.
Comment 8 EWS 2023-01-25 09:46:29 PST
Committed 259368@main (96deabf28dd0): <https://commits.webkit.org/259368@main>

Reviewed commits have been landed. Closing PR #8896 and removing active labels.
Comment 9 Bruno Stasse 2023-01-25 10:14:27 PST
Thank you for the fix!