Skip to content

Commit ed8479c

Browse files
author
scottjehl
committed
styled fakeBody to have background: none, preventing IE crashes when background image is on body element. Addresses issue #106. Please confirm the fix!
1 parent fd892e1 commit ed8479c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

respond.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

respond.src.js

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ window.matchMedia = window.matchMedia || (function(doc, undefined){
1111

1212
div.id = 'mq-test-1';
1313
div.style.cssText = "position:absolute;top:-100em";
14+
fakeBody.style.background = "none";
1415
fakeBody.appendChild(div);
1516

1617
return function(q){
@@ -176,6 +177,7 @@ window.matchMedia = window.matchMedia || (function(doc, undefined){
176177

177178
if( !body ){
178179
body = fakeUsed = doc.createElement( "body" );
180+
body.style.background = "none";
179181
}
180182

181183
body.appendChild( div );

0 commit comments

Comments
 (0)