Opened 11 years ago
Closed 10 years ago
#11280 closed bug (fixed)
appending elements to an object element fails in IE < 9
Reported by: | TimJRobinson | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | manipulation | Version: | 1.7.1 |
Keywords: | ie6 ie7 ie8 | Cc: | |
Blocked by: | Blocking: |
Description
I'm getting a strange but in IE 6, 7 & 8 where if you append an element to an <object> tag it will give the error:
SCRIPT87: Invalid argument.
I've reproduced this bug in jsfiddle here: http://jsfiddle.net/gR2E9/
If I append text it appears to work fine, it only breaks if I append an element.
It's breaking on line 5653 of jQuery 1.7.1 for me saying elem is an invalid argument.
I'm running on Windows 7 using IE9 in compatability mode. Though I have also reproduced this bug in IE 8 and IE 7 on windows XP.
Change History (6)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Status: | new → open |
Thanks for the test cases, it's really strange because when you trace through it with the debugger we're doing the same appendChild operation of the param to an object. I think it may be that the html string with a "<param ..." isn't being created correctly but it's a sufficiently rare corner case that I'll just mark it open for now.
comment:3 Changed 11 years ago by
Keywords: | ie6 ie7 ie8 added |
---|
comment:4 Changed 10 years ago by
Component: | core → manipulation |
---|---|
Milestone: | None → 1.9 |
Oh I see what's happening. The <param>
needs an <object>
wrapper to be created correctly: http://jsfiddle.net/gR2E9/22/
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fix #11280. IE6-8 need name attribute to parse param. Close gh-914.
Changeset: ef7bce7e5c67f29a7e09ea1b0bb43b429fc9f59b
I also recreated adding the element in pure javascript and it works as expected:
http://jsfiddle.net/timjrobinson/YhytD/1/