Skip to content

Commit

Permalink
IE7 gets value of last test in injectElementWithStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Feb 6, 2012
1 parent 9df99be commit fb36e3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ window.Modernizr = (function( window, document, undefined ) {
// Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
fakeBody.innerHTML += style;
fakeBody.appendChild(div);
docElement.appendChild(fakeBody);
if(!body){
docElement.appendChild(fakeBody);
}

ret = callback(div, rule);
// If this is done after page load we don't want to remove the body so check if body exists
Expand Down

0 comments on commit fb36e3c

Please sign in to comment.