Ticket #3302 (closed bug: fixed)
DOM tree errors after multiple clones in IE
|Reported by:||mv987||Owned by:|
Description (last modified by dmethvin) (diff)
In Internet Explorer: After performing a clone of a clone of an element with children, there are errors in jQuery traversal.
see the attached files. test.html has a table with a row with three cells. test2.html has a div with three child divs.
in IE, on both of these pages, if you click 'Add Row' twice (thich clones the parent element), and then click 'click here' in the bottom row, it reports there are 2 children in the parent element.
The parent element obviously has three children. clicking 'click here' on the other two parent elements reports correctly.
as a side note, if you click 'add row' once, and then 'click here' on the new element, and then 'add row' again, the third element reports correctly in this case.
It seems like the cloned elements are not 'fresh' or something - as in the cached data is old and it is not rescanning?
i discovered this as I was trying to make a table of inputs that could be expanded. I also noticed that clone(true) was sometimes applying the event handlers to the wrong element in the cloned element. for example, the click handler was being put on the TD instead of the A inside that TD. Still trying to repro that consistently. It might be related to this.