Ticket #10298 (closed bug: invalid)
appendChild not working in IE
| Reported by: | ej | Owned by: | ej |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | misc | Version: | 1.6.4rc1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
In a in-app browser IE based the following is failing line 5644:
this.appendChild( elem );
I found #4378, and applying the same fix works:
this.parentNode.appendChild( elem );
Change History
comment:1 Changed 20 months ago by addyosmani
- Owner set to ej
- Priority changed from undecided to low
- Status changed from new to pending
- Component changed from unfiled to misc
comment:2 Changed 20 months ago by Andrew
This is probably not the best example, but it shows the error reported,
Run in IE7 or IE8
I don't know if this is even valid, but you can see in FF/Chrome/IE9 the input will end up with "Echo!" being set as its innerHTML whereas in IE7/IE8 an error gets thrown, as it tries to append it to the input when the innerHTML call fails in the html() function.
comment:3 Changed 20 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:4 Changed 20 months ago by dmethvin
- Status changed from closed to reopened
- Resolution invalid deleted
comment:5 Changed 20 months ago by dmethvin
- Status changed from reopened to closed
- Resolution set to invalid
The test case is attempting to set content on an input element that cannot have children. IE throws an error for this case to notify you, but other browsers ignore the invalid action. In any case it's not something that anyone should be doing.
comment:6 Changed 7 months ago by sacpundir
replace
this.appendChild( elem );
with
try
{
this.appendChild( elem );
}
catch(err)
{
}
The test case is attempting to set content on an input element that cannot have children. IE throws an error for this case to notify you, but other browsers ignore the invalid action. In any case it's not something that anyone should be doing.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Please provide us with some more information. When you say an in-app browser IE, do you mean an application using the MSIE ActiveX control? If so, what application are you referring to specifically? We'll need a little more information and ideally also a test case on jsFiddle that fully reproduces the behaviour you're seeing so we can evaluate it more accurately.