benbarnett/jQuery-Animate-Enhanced — Issue #67: Incompatible with HighchartsJS (breaks SVG ownerDocument?)
Author: kmiyashiro
Created: 2012-01-22 02:42:07+00:00
State: open

http://www.highcharts.com/

jsfiddle: http://jsfiddle.net/kmiyashiro/HUAhP/

Even with animation turned off, this breaks Highcharts. I don't know why it would still call animation functions when they are turned off, but eh.

The problem is that getComputedStyle fails on an SVG element, for some reason its ownerDocument is no longer defined when animated with this plugin.

```
if ( document.defaultView && document.defaultView.getComputedStyle ) {
getComputedStyle = function( elem, name ) {
var ret, defaultView, computedStyle;
name = name.replace( rupper, "-$1" ).toLowerCase();
if ( (defaultView = elem.ownerDocument.defaultView) && <---- elem.ownerDocument is undefined
(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name );
}
}
return ret;
};
}
```