Bug Tracker

Ticket #10298 (closed bug: invalid)

Opened 3 years ago

Last modified 17 months ago

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 3 years 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

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.

Version 0, edited 3 years ago by addyosmani (next)

comment:2 Changed 3 years ago by Andrew

This is probably not the best example, but it shows the error reported,

Run in IE7 or IE8

 http://jsfiddle.net/DntAB/2/

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 3 years 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 3 years ago by dmethvin

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:5 Changed 3 years 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 2 years 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.

Last edited 2 years ago by sacpundir (previous) (diff)

comment:7 Changed 17 months ago by cfischer83@…

IE8 does fails when trying to append to html5 elements, such as aside, section, article etc.

Note: See TracTickets for help on using tickets.