Skip to content

Commit

Permalink
Fixes Modernizr#506 IE9 mq issue and failing test in IE6/7
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanseddon committed Feb 23, 2012
1 parent ceea6ab commit c9828ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modernizr.js
Expand Up @@ -110,7 +110,7 @@ window.Modernizr = (function( window, document, undefined ) {
div.id = mod; div.id = mod;
// IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
// Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
fakeBody.innerHTML += style; (body ? div : fakeBody).innerHTML += style;
fakeBody.appendChild(div); fakeBody.appendChild(div);
if(!body){ if(!body){
//avoid crashing IE8, if background image is used //avoid crashing IE8, if background image is used
Expand Down
2 changes: 1 addition & 1 deletion test/js/unit.js
Expand Up @@ -393,7 +393,7 @@ test('Modernizr.testStyles()',function(){


equals(typeof Modernizr.testStyles, 'function','Modernizr.testStyles() is a function'); equals(typeof Modernizr.testStyles, 'function','Modernizr.testStyles() is a function');


var style = '#modernizr{ width: 9px; height: 4px; color: papayawhip; }'; var style = '#modernizr{ width: 9px; height: 4px; font-size: 0; color: papayawhip; }';


Modernizr.testStyles(style, function(elem, rule){ Modernizr.testStyles(style, function(elem, rule){
equals(style, rule, 'rule passsed back matches what i gave it.') equals(style, rule, 'rule passsed back matches what i gave it.')
Expand Down

0 comments on commit c9828ee

Please sign in to comment.