title: Why does this flicker in Firefox?
body: <p>It works as I'd expect in Chrome and MSIE. For some reason the event is firing on the inner rect element as well as the SVG element (I think). Here's the sauce (this is the entire page):</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
      &lt;svg width="400" height="400" style="overflow: hidden; border: 1px solid gray" id="mySVG"&gt;
          &lt;rect x="10" y="10" width="100" height="100" fill="red" id="myRect"&gt;&lt;/rect&gt;
      &lt;/svg&gt;
  
      &lt;script&gt;
          svg  = document.getElementById('mySVG');
          rect = document.getElementById('myRect');
  
          svg.onmousemove = function (e)
          {
              if (e.currentTarget.toString().indexOf('SVGSVGElement') &gt;= 0) {
  
                  var x = e.offsetX,
                      y = e.offsetY;
  
                  if (x &amp;&amp; y) {
                      console.log(x)
                      rect.setAttribute('x', x - 50);
                      rect.setAttribute('y', y - 50);
                  }
              }
          };
      &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>