Bug 152548 - clip-path property incorrectly clips pointer-events for clipped elements
Summary: clip-path property incorrectly clips pointer-events for clipped elements
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 126207
  Show dependency treegraph
 
Reported: 2015-12-24 12:30 PST by Klemen Slavic
Modified: 2021-11-13 07:00 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klemen Slavic 2015-12-24 12:30:47 PST
Reproduction URL: http://codepen.io/KrofDrakula/pen/zrKNKP

What steps will reproduce the problem?
1. open the page in the link
2. try clicking outside of the images/red area on the text surrounding the images
3. popup alert() appears notifying you of a click on one of the .content <img> elements

What is the expected result?

Should not pop up an alert() since the images should not be clickable outside of their clip-path regions (clipped by its parent, .view).

What happens instead of that?

Pointer events are triggered on the fixed positioned element outside of its parent's clipping path, which it shouldn't (it doesn't render outside of the bounds of its parent's clip path).

Note: this happens in Chrome, too (https://code.google.com/p/chromium/issues/detail?id=572107). Firefox handles this correctly, but in the demo page, the third example doesn't work since it only supports URL SVG clipping paths, not inset().
Comment 1 Daniele Orlando 2020-03-01 14:12:26 PST
I still can reproduce this bug with Safari 13.0.5, 4 years ago.
Firefox and Chrome do behave as expected instead.
Comment 2 Radar WebKit Bug Importer 2020-03-02 09:45:11 PST
<rdar://problem/59954339>
Comment 3 Bruno Stasse 2021-11-13 07:00:31 PST
This seems fixed in STP 134 (and maybe before)? I can't reproduce anymore with the testcase.

There are still issues probably related to this, with scrolling. I just created this: https://bugs.webkit.org/show_bug.cgi?id=233084