diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-05-02 11:57:01 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-05-02 11:57:01 -0400 |
commit | f1392d82089323ec9ef97b33909b960cc16c25b6 (patch) | |
tree | 08f3bf3c4886583775a6e54c299f4d319104de3d | |
parent | 24a8ffb3eae56345231931184891f25f6ce017cf (diff) | |
download | jquery-f1392d82089323ec9ef97b33909b960cc16c25b6.tar.gz jquery-f1392d82089323ec9ef97b33909b960cc16c25b6.zip |
Set background to none on our mock body and remove its contents to avoid a crash in IE when removing it. Fixes #9028.
-rw-r--r-- | src/support.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/support.js b/src/support.js index ea14bac63..41af06322 100644 --- a/src/support.js +++ b/src/support.js @@ -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 |