Permalink
Browse files

styled fakeBody to have background: none, preventing IE crashes when …

…background image is on body element. Addresses issue #106. Please confirm the fix!
  • Loading branch information...
1 parent fd892e1 commit ed8479c561b7fae590953c0a00a35200d328236a scottjehl committed Mar 9, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −2 respond.min.js
  2. +2 −0 respond.src.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -11,6 +11,7 @@ window.matchMedia = window.matchMedia || (function(doc, undefined){
div.id = 'mq-test-1';
div.style.cssText = "position:absolute;top:-100em";
+ fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function(q){
@@ -176,6 +177,7 @@ window.matchMedia = window.matchMedia || (function(doc, undefined){
if( !body ){
body = fakeUsed = doc.createElement( "body" );
+ body.style.background = "none";
}
body.appendChild( div );

1 comment on commit ed8479c

I can confirm that this fixes the crash issues we experienced with IE8 on Windows XP. Thanks!

Please sign in to comment.