Commit f1392d82 authored by timmywil's avatar timmywil

Set background to none on our mock body and remove its contents to avoid a...

Set background to none on our mock body and remove its contents to avoid a crash in IE when removing it. Fixes #9028.
parent 24a8ffb3
...@@ -142,7 +142,9 @@ jQuery.support = (function() { ...@@ -142,7 +142,9 @@ jQuery.support = (function() {
width: 0, width: 0,
height: 0, height: 0,
border: 0, border: 0,
margin: 0 margin: 0,
// Set background to avoid IE crashes when removing (#9028)
background: "none"
}; };
for ( i in bodyStyle ) { for ( i in bodyStyle ) {
body.style[ i ] = bodyStyle[ i ]; body.style[ i ] = bodyStyle[ i ];
...@@ -207,6 +209,7 @@ jQuery.support = (function() { ...@@ -207,6 +209,7 @@ jQuery.support = (function() {
} }
// Remove the body element we added // Remove the body element we added
body.innerHTML = "";
document.documentElement.removeChild( body ); document.documentElement.removeChild( body );
// Technique from Juriy Zaytsev // Technique from Juriy Zaytsev
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment