Response title
This is preview!
if ( document.documentElement.contains ) { Sizzle.contains = function( a, b ) { return a !== b && (a.contains ? a.contains(b) : true); };
In the case of a hover event on an SVG element, "a" is the SVG element and "b" is likely some containing DOM element. The first condition fails, naturally. The second also fails, because the SVG element does not have a contains() function. Thus, the function returns "true". Without going into detail, that return value causes a conditional statement in the mouseenter/mouseleave event processor to fail, preventing the handler from being executed.With a little bit of poking around in the debugger, I found that the alternate implementation of contains() seems to behave as expected in this situation:} else if ( document.documentElement.compareDocumentPosition ) { Sizzle.contains = function( a, b ) { return !!(a.compareDocumentPosition(b) & 16); };Knowing that, I was able to resolve my issue by adding a fallback to compareDocumentPosition() to the default implementation. I modified line 5306 in jquery-1.7.js to the following:return a !== b && (a.contains ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : true);All this does is try to use compareDocumentPosition() if contains() does not exist on the element being inspected. In most cases, there should be no change in behavior. In our deviant IE9 case, it allows the hover events to fire as expected.Hope this helps someone.
I understand this completely. Not knowing the history of the problem, though, finding the statement "we're not addressing SVG issues" (I can't provide a link as to where I found that) was just a bit frustrating.I don't think we've been dismissive, just thwarted. Every time we fix one SVG-IE bug (and we fixed several MORE in 1.7), another pops up that was being masked by the first. In the tickets, nobody ever provide clear test cases so we are flying blind much of the time.
© 2013 jQuery Foundation
Sponsored by and others.