Skip to main content

Bug Tracker

Side navigation

#11521 closed bug (wontfix)

Opened March 26, 2012 06:09PM UTC

Closed March 26, 2012 06:49PM UTC

Last modified March 27, 2012 05:58AM UTC

JS error on IE <= 8 when jQuery objects containing HTML5 are inserted to DOM

Reported by: Haprog Owned by: rwaldron
Priority: undecided Milestone: None
Component: manipulation Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

Here's a simple fiddle that demonstrates the problem:

http://jsfiddle.net/Haprog/5MnDG/

You get a JavaScript error on IE8 and older when using the latest html5shiv and jQuery 1.7.2. The problem also appears on jQuery 1.7.1 and edge.

Tested on Windows 7 (32bit and 64bit) using IETester, and Windows XP with IE8 on VirtualBox.

The problem doesn't occur on IE9, Firefox 11 or Chrome 18.

The error you get on IE8 and older is "'nodeType' is null or not an object" in jQuery (edge) and 1.7.2 on line 6101, char 2, (or jQuery 1.7.1 on line 6001) in function cloneCopyEvent()

More info in the JS comments of the fiddle.

Seems like this may be related to #6485

I found this while working on an AJAX application that completely stopped working on IE8 and older because of this issue, before I figured out what was the cause and found the workaround that's mentioned in the JS comments of the fiddle.

Attachments (0)
Change History (5)

Changed March 26, 2012 06:18PM UTC by rwaldron comment:1

component: unfiledmanipulation
owner: → rwaldron
status: newassigned

Changed March 26, 2012 06:20PM UTC by rwaldron comment:2

When the newest html5shiv was being developed, I had tested the against the latest jQuery without any issues - it looked like the html5shiv guys had it under control. jQuery is tested using the original, minimal shiv code.

Changed March 26, 2012 06:49PM UTC by rwaldron comment:3

resolution: → wontfix
status: assignedclosed

I just spoke with John-David Dalton who informed me that this was a known issue with html5shiv that has been fixed on their end and will be fixed in the next release. In the mean time, here is the edge code to use:

http://raw.github.com/aFarkas/html5shiv/master/src/html5shiv.js

Changed March 26, 2012 07:04PM UTC by Haprog comment:4

Thank you for the information! Everything seems to be working well when using that latest edge version of html5shiv. :)

Changed March 27, 2012 05:58AM UTC by Haprog comment:5

Hmm.. now the previous URL doesn't seem to work as is, but it works with https. https://raw.github.com/aFarkas/html5shiv/master/src/html5shiv.js