Permalink
Browse files

explicitly set height in scrollbar test fixes false positive in IE9 (…

…Issue #698)
  • Loading branch information...
1 parent def11e6 commit 354aea6a2dddba78d0f6335a2e76a0c37d7b7232 @aFarkas aFarkas committed Oct 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 feature-detects/css-scrollbars.js
@@ -3,15 +3,15 @@ Modernizr.addTest('cssscrollbar', function() {
var bool,
- styles = "#modernizr{overflow: scroll; width: 40px }#" +
+ styles = "#modernizr{overflow: scroll; width: 40px; height: 40px; }#" +
Modernizr._prefixes
.join("scrollbar{width:0px}"+' #modernizr::')
.split('#')
.slice(1)
.join('#') + "scrollbar{width:0px}";
Modernizr.testStyles(styles, function(node) {
- bool = 'scrollWidth' in node && node.scrollWidth == 40;
+ bool = node.scrollWidth == 40;
});
return bool;

0 comments on commit 354aea6

Please sign in to comment.