Bug 140723

Summary: SVG overflow:visible mouse events broken
Product: WebKit Reporter: shauser
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bbudd, bfulgham, krit, mmaxfield, rniwa, sabouhallawa, sriram15690, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://codepen.io/anon/pen/pvPQqY

Description shauser 2015-01-21 08:12:56 PST
This is related to #96163 (https://bugs.webkit.org/show_bug.cgi?id=96163)

When `overflow: visible` is set on an SVG element, it now renders the overflowing content, 
however mouse events do not work.

In the linked example, hovering over the overflowed part of a `rect` node does not cause 
the `:hover` pseudo class to apply, and clicking in the overflowed part of a `rect` node
does not supply the correct event target for the event handler in the JS. Clicking on
parts of the `rect` within the SVG node does work as expected.
Comment 1 Dirk Schulze 2015-01-21 11:10:58 PST
Blink fix https://code.google.com/p/chromium/issues/detail?id=231577
Comment 2 shauser 2015-01-21 15:14:36 PST
Dirk, unsure what you mean. Are you just referencing the blink fix to facilitate fixing  webkit or are you suggesting that this issue has already been fixed?
Comment 3 Dirk Schulze 2015-01-22 00:11:20 PST
(In reply to comment #2)
> Dirk, unsure what you mean. Are you just referencing the blink fix to
> facilitate fixing  webkit or are you suggesting that this issue has already
> been fixed?

This is meant for the developer fixing this bug.
Comment 4 shauser 2015-01-22 06:11:22 PST
Cool, thanks for clarifying.
Comment 5 Bob Budd 2016-11-07 04:28:36 PST
I'm wondering if there's any movement on this bug at all? Anything roadmapped? I'd love to see a fix for this.
Comment 6 Sriram R 2019-05-20 04:20:46 PDT
I'm wondering if there's any movement on this bug at all? Anything road mapped? I'd love to see a fix for this.
Comment 7 Ahmad Saleem 2022-07-14 13:53:17 PDT
I am able to reproduce this bug in Safari 15.5 on macOS 12.4 by performing following steps:

1) Load Codepen from the Description or URL
2) Hover the mouse on "BLACK" square on the outer edge (outside of red square - which is overlapped by black square)
3) Hover will not be activated (except for first - top left) and clicking with give "BODY" as result

--> Expected Result (Which is consistent across all other browsers - Chrome Canary 105 and Firefox Nightly 104):

hover to be activated even if the mouse cursor is outside on the black square portion

--> Actual Result:

Hover only activate for nodes when mouse is on red square or inner part of black box covering red square

If I am testing incorrectly, please retest accordingly. Thanks!
Comment 8 Brent Fulgham 2022-07-15 17:08:12 PDT
This actually seems to work properly, at least in Safari 16 on macOS 13 Beta. I can click in areas outside of the SVG, and see things like BODY, P, LI, and so forth.

I think this behavior has progressed.