From: Corey Frang Date: Fri, 13 Jul 2012 21:03:21 +0000 (-0500) Subject: Fix #9217. oldIE error when changing detached elements, close gh-861 X-Git-Tag: 1.8rc1~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=74cc5b0984335532ab272b8286566000c4bf3daf;p=jquery.git Fix #9217. oldIE error when changing detached elements, close gh-861 --- diff --git a/src/effects.js b/src/effects.js index 22e79f1ba..8ab41cbd3 100644 --- a/src/effects.js +++ b/src/effects.js @@ -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 );