]> source.dussan.org Git - jquery.git/commitdiff
Fix #9217. oldIE error when changing detached elements, close gh-861
authorCorey Frang <gnarf@gnarf.net>
Fri, 13 Jul 2012 21:03:21 +0000 (16:03 -0500)
committerDave Methvin <dave.methvin@gmail.com>
Mon, 23 Jul 2012 02:13:31 +0000 (22:13 -0400)
src/effects.js

index 22e79f1bafb11f76fb62361edf93af46adb5d317..8ab41cbd346f368710297f0619d637dfe99dfbd9 100644 (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 );