Skip to content

IE8 crash when using a body background image #501

Closed
@necolas

Description

I'm experiencing a hard crash running Modernizr 2.5.2 in IE8 (Windows XP) under these circumstances:

  1. Include styles before Modernizr (as recommended)
  2. Include a background image on the body
  3. Include Modernizr with a test like "generated content".

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.

Thanks

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions