aFarkas / html5shiv

This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.
http://paulirish.com/2011/the-history-of-the-html5-shiv/
9.89k stars 2.56k forks source link

Jquery().clone() and append() #77

Open arbixy opened 12 years ago

arbixy commented 12 years ago

Please have some tests with jQuery-append method and IE8, there are cases when the appended node doesn't shiv. My last issue was with .clone() and then .append() Till now updating to last version of html5shiv was helpful.

chee commented 11 years ago

could you put a reduced example of this somewhere?

durko commented 11 years ago

Here is a small example that fails with in IE8 using hmtl5shiv-3.6.2 and jQuery-1.8.3.

This works:

$('<div><figure></figure></div>').html() -> '<figure></figure>'

This should give the same result as above, but doesn't:

$('<div><figure></figure></div>').clone().html() -> '<:figure></:figure>'
ytsurk commented 11 years ago

maybe it helps to put an   in the figure.

durko commented 11 years ago

The behaviour does not depend on the content of the figure. I chose an empty figure as an example for brevity. Another example with the same problems:

<figure>
    <img src='/some/image'>
    <figcaption>Some text</figcaption>
</figure>