You can clone with
HTTPS or Subversion.
I'm experiencing a hard crash running Modernizr 2.5.2 in IE8 (Windows XP) under these circumstances:
Reduced test case: http://jsbin.com/etoget
That test case includes a build of Modernizr containing just the generated content test as an example of the type of test that crashes IE8 - not all tests do; I think only those that involve style/dom injection.
Edit: Potential fix (via similar jQuery resolved-bug - http://bugs.jquery.com/ticket/9823)
Fixed example: http://jsbin.com/etoget/2/
Fixed by adding background: none to the injected <style> block for the fake body
Confirmed here. IE8 crashes upon loading the test case.
Ran your test case in Win XP/IE8, and it crashed the browser
Crashes IE8 on windows xp. Today I experienced hard crashes on IE7/Vista as well with Modernizr 2.5.2.
Didn't have time to setup an isolated test to find what's causing it though.
A fixed jQuery bug is related: http://bugs.jquery.com/ticket/9823
This Modernizr bug is also fixed by adding background: none to the injected <style> block for the fake body
IE8 test case with crude fix: http://jsbin.com/etoget/2/
Hmm tested this on browserstack and everything is working on IE6,7 and 8. Not sure how relevant browserstack setup is for this bug?
Well I tested this on Windows XP/IE8 (IE6 is default browser but IE7 and IE8 installed via http://utilu.com/IECollection/ method) and the page/browser didn't crash for me.
With an un-primed cache, the test case does not crash IE8 on Windows XP for me. When the cache is primed, however, it crashes every time.
Can confirm this crashes IE8, interestingly setting background:0 also stops it crashing can someone try this http://jsbin.com/etoget/14/ and confirm it stops the crashing.
Ryan, that doesn't crash for me either...it seems to act like background-position: 0 50%. Anything to explicitly set a valid background on the temporary body works. Hopefully this can get patched soon :)
background-position: 0 50%
nicolas thank you so much for kicking this off with a reduced testcase. :)
fix issue #332 and issue #501
Modernizr 2.5.3 has shipped which fixes this issue.
This is still happening to me with version 2.5.3 with respond 1.1.0 from Initializr package. The same cause: background on the body tag in linked CSS file.
It's actually the matchMedia polyfill it includes in the build when you check respond. Modernizr has fixed that issue the one initializer includes has not.
Initializer is actually doubling up as the build of Modernizr they include already has a matchMedia polyfill via Modernizr.mq which also handles the background crashing issues for IE8.
I had the same issue, I had to regenerate back to 2.0.6.
It should have been fixed 2 days ago. Can someone verify?