Q:

How to stop Firefox firing mouseleave when DOM node is moved in the DOM?

I am responding to mouseenter events on an SVG path element by making the path the last child in its parent. This is so it appears on top of other elements (no z-index on SVG stuff unfortunately). The problem is that on Firefox this causes a mouseleave event to fire. This works fine on Chrome.
// on mousenter
node.parentNode.appendChild(node)
// this triggers a mouseleave .. if i don't move the node it works

Does anyone know a workaround or another approach?

A:

remove the handler before the appendChild and reinstate it afterwards. 

