Fix #9217. oldIE error when changing detached elements, close gh-861

This commit is contained in:
Corey Frang 2012-07-13 16:03:21 -05:00 committed by Dave Methvin
parent aa3fabce46
commit 74cc5b0984

11
src/effects.js vendored
View File

@ -426,6 +426,17 @@ Tween.propHooks = {
}
};
// Remove in 2.0 - this supports IE8's panic based approach
// to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
if ( tween.elem.nodeType && tween.elem.parentNode ) {
tween.elem[ tween.prop ] = tween.now;
}
}
};
function isHidden( elem, el ) {
elem = el || elem;
return curCSS( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument.documentElement, elem );