Re: [svg-developers] SVG element and event passthrough
- On Sun, 30 Dec 2007 07:49:43 +0100, pekeler <christian@...> wrote:
> Hi,Hmm...it seems to differ a bit, but I can't say that it's working that
> if I have an SVG element in front of some other DOM elements, Safari 3
> is letting mouse
> events pass through the SVG and reach the underlying DOM elements (good)
well on your testcase. The mouse cursor is reset before it reaches the
polygon for me in Safari 3 if I move from right to left over the link.
> Firefox 3 and Opera aren't (bad). Is there anything I can do to haveYou can try making your svg be lower than the html, for example by using
> Firefox behave like Safari?
"z-index:-1". That works fine in all three browsers.
> This example demonstrates the problem. It's OK that the polygon blocksYou can always compare with this non-svg testcase:
> the link, but I
> don't want the svg element to eat my mouse events.
> <html xmlns="http://www.w3.org/1999/xhtml"
> <svg:svg pointer-events="none" style="position:absolute; top:0;
> left:0; width:100px;
> <svg:polygon pointer-events="all" points="5,5 70,5 45,45"
> <a href="#">try to click this link</a>
<div style="position:absolute; top:0; left:0; width:100px; height:50px;
background: red; opacity:0"/>
<a href="#">try to click this link</a>
Erik Dahlstrom, Core Technology Developer, Opera Software