Skip to main content

Bug Tracker

Side navigation

#4643 closed bug (worksforme)

Opened May 10, 2009 05:01PM UTC

Closed November 19, 2010 10:09AM UTC

clone(true) bug with multiple nested elements

Reported by: balazs.endresz Owned by:
Priority: major Milestone: 1.4
Component: manipulation Version: 1.3.2
Keywords: clone, find Cc:
Blocked by: Blocking:
Description

Running jQuery("p").find("*").clone(true);

in the attached file produces this error:

orig[i] is undefined

inside the clone method

ret.find("*").andSelf()

returns the abbr element twice, which is a child of another one in the set

Attachments (1)
Change History (3)

Changed May 13, 2009 07:42PM UTC by balazs.endresz comment:1

The problem seems to be that the abbr node is present in the original set and it's also a child node of another element in the same set, so it gets cloned twice, thus jQuery.unique thinks we've got two of them. I guess there's no easy or efficient way to fix it.

Changed June 13, 2010 02:45AM UTC by dmethvin comment:2

component: unfiledmanipulation

Changed November 19, 2010 10:09AM UTC by snover comment:3

resolution: → worksforme
status: newclosed

test case works for me.