Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
css-scrollbars detect returning true for IE 9 #698
I am using the css-scrollbars detect to determine if a scrollbar's width can be adjusted. This test is returning for me:
Apparently other people are also seeing this issue. More information is in this pull request:
Thanks for bringing this up again @dimensia – the notification somehow slipped off my radar, but boy am I glad I'm not the only one running into this.
As described in my original comment, I only experience the tests returning an incorrect "true" in IE9 and 8 in the context of our application but not in the isolated jsFiddle test case – which I just updated to Modernizr 2.6.2 (original comment and jsFiddle-link here).
A quick workaround is described here.
but I haven't had the time for a stepwise removal yet and I also don't see much sense in it. I also don't think the feature-detect chokes on the CSS of our app – no global resets or anything nasty regarding html and body, overflows or similar things going on.
Just to be sure I really killed all CSS, I checked IE's dev-console CSS-tab, and just the styles for
Sorry for taking a bit longer; I finally stripped down the
Then – while already writing this – I think "let's give it a final try in IE8" and voila, the test returns
A few minutes later it seems I found out that IE8 returns the false
New online examples for y'all to test plus a quick recap:
pushed a commit
Oct 7, 2012
In case the test element has a smaller height or width, than the scrollbar width the element collapses to the given width in IE9, therefore it returned a false positive. The old test inserted a $shy; inside of the div and gave this div a height. I'm now giving an explicit height and test returns false for IE9/IE8 now. Also tested Safari/Chrome/Firefox. Everything seems fine now :-).
Can anyone of you guys confirm it works and close the bug?
Just tested in
and all tests now return as they should (even without the doctype ;)).
I wish I could have been of more help/would have had the time to get my head around modernizr tests in general, and the differences between the original and the updated test in particular – indeed I just yesterday understood the purpose of the