New issue
Advanced search Search tips

Issue 706015 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

SVG foreign object misses hittest of itself

Project Member Reported by wangxianzhu@chromium.org, Mar 28 2017

Issue description

http://jsbin.com/gojohi

Expected: Green changes to magenta when the green area clicked.
Actual: Green changes to magenta when the blue area is clicked.

Reason: foreignObject doesn't receive onclick when an area in which no descendant exists is clicked.

 

Comment 1 by f...@opera.com, Mar 28 2017

This sounds like reasonable behavior as long as 'pointer-events' is the initial value ('visiblePainted'), but it looks like there might be some breakage for some values of 'pointer-events' ('bounding-box' most certainly.) The spec has fO as a "graphics element", although in my mind it's more of a "container element", so it becomes a bit fuzzy which p-e modes should result in hits...
Some questions:
- I just tried in Firefox, and it doesn't show background of fO at all. Does any spec define whether fO should paint CSS background?
- As we paint background of fO, should "pointer-events: visiblePainted" apply to fO with a background?
- Should "pointer-events: all" apply to container elements?

Comment 3 by f...@opera.com, Mar 28 2017

> - I just tried in Firefox, and it doesn't show background of fO at all. Does any spec define whether fO should paint CSS background?

The spec for fO [1] is generally very loose, so I don't think there any spec for whether CSS 'background' or similar embellishments should be painted. Arguably it isn't intended to define a CSS layout box though, so maybe the Gecko behavior makes more sense. This is not something I think we need to change though.

[1] https://svgwg.org/svg2-draft/embedded.html#ForeignObjectElement

>- As we paint background of fO, should "pointer-events: visiblePainted" apply to fO with a background?

Disregarding whether a background should be painted or not, it would make sense for it to respond to pointer events in the same way as 'fill' would.

>- Should "pointer-events: all" apply to container elements?

Since a container wouldn't have 'fill' or 'stroke' geometry, the 'all' value would have no effect. (If there was a container which did have geometry it would arguably apply - which would feed into the above I suppose.)
Labels: PaintTeamTriaged-20170328 BugSource-Team
Status: WontFix (was: Available)
Thanks fs@opera.com for the explanation.

Sign in to add a comment