Re: Announcement: Last Call WD of SVG 1.1 Second Edition

Am 02.02.2011 um 11:21 schrieb Erik Dahlstrom:

> However, a thing to note is that filters aren't meant to affect pointer-events processing at all, for the purposes of hit detection it's as if there was no filter applied [2].

One possibility would be to take the filter region for pointer events. But some SVG's take the complete viewport of the root SVG element as filter region, because this solves the problem of a web developer to determine the correct clipping region for drop shadows. It would be much more helpful (but still not perfect) to just use the affected area for pointer events. The problem is, that the specification does not define how to determine this region (just the filter or primitive regions for clipping), so it can't be defined that this region should be used.

Note, the same occurs to SVG masks. The spec wants the implementer to ignore masks for pointer events as well. This gets a bigger problem, if the target element gets completely clipped away by the mask.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<mask id="mask">
<rect width="100" height="100" fill="black"/>
</mask>
</defs>
<rect width="100" height="100" fill="green"/>
<rect width="100" height="100" fill="red" mask="url(#mask)" style="cursor:pointer"/>
</svg>

The red rect has the focus, even if it is invisible.

Cheers
Dirk

Received on Wednesday, 2 February 2011 11:50:06 UTC