]> source.dussan.org Git - jquery.git/commitdiff
Set background to none on our mock body and remove its contents to avoid a crash...
authortimmywil <tim.willison@thisismedium.com>
Mon, 2 May 2011 15:57:01 +0000 (11:57 -0400)
committertimmywil <tim.willison@thisismedium.com>
Mon, 2 May 2011 15:57:01 +0000 (11:57 -0400)
src/support.js

index ea14bac63650b3327d91900cbfb3994046dfa8a5..41af0632206138417f7d253e1e9d6867a2e71e52 100644 (file)
@@ -142,7 +142,9 @@ jQuery.support = (function() {
                width: 0,
                height: 0,
                border: 0,
-               margin: 0
+               margin: 0,
+               // Set background to avoid IE crashes when removing (#9028)
+               background: "none"
        };
        for ( i in bodyStyle ) {
                body.style[ i ] = bodyStyle[ i ];
@@ -207,6 +209,7 @@ jQuery.support = (function() {
        }
 
        // Remove the body element we added
+       body.innerHTML = "";
        document.documentElement.removeChild( body );
 
        // Technique from Juriy Zaytsev