[whatwg] Non-blocking SVG Canvas?
Boris Zbarsky
bzbarsky at MIT.EDU
Thu Aug 5 14:49:54 PDT 2010
On 8/5/10 4:40 PM, Kevin Ar18 wrote:
> I guess that would solve future issues... but it involves a new spec right?
Well, any sort of clarification here does, yes.
> My concern is that we get this specific HTML5-SVG interaction right now
It needs a new spec no matter what, no matter where it lives...
> Since the problem area is Firefox
In the sense that in Gecko <svg> is not transparent to events by default?
Note that transparency to events is not even interoperable inside HTML;
e.g. an empty div will block events in some browsers but not others.
That said, support for pointer-events:none on arbitrary elements makes
this point moot; you just assume the worst and add styles that describe
the exact behavior you want.
> However, I am not clear on the specs
The specs do not define event targeting behavior at all.
> According to here (http://www.w3.org/TR/SVG11/struct.html#SVGElement) pointer-events is a property of the svg tag.
Correct.
> According to here (http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty) pointer-events is not a property of the svg tag since svg is not part of the graphical elements group.
Not quite. It doesn't _apply_ to the <svg> tag. But it's a property of
all elements. And since it inherits by default, this distinction is a
meaningful one (e.g. you can set pointer-events to some value on an
<svg> to set it to that value on all graphical elements contained in the
<svg>).
> So, does this actually mean a browser should not support pointer-events for the svg tag within a html document?
Technically, per SVG spec, yes. I believe there is common agreement
(well, at least in Webkit and Gecko) that this needs a spec change to
give better behavior.
> I was considering filing a report for Firefox about not supporting pointer-events:painted for the svg tag inside an html document.
The thing is... as "painted" is defined in the SVG spec, it doesn't make
sense for <svg> (which never has any fill or stroke that actually do
anything). This is why a separate spec is needed to define the behavior
here.
That said, you may be interested in
https://bugzilla.mozilla.org/show_bug.cgi?id=380573
-Boris
More information about the whatwg
mailing list