Skip to main content

Bug Tracker

Side navigation

#10437 closed bug (invalid)

Opened October 06, 2011 01:26PM UTC

Closed October 21, 2011 08:04AM UTC

Last modified April 02, 2012 02:54PM UTC

.remove() method used on cloned [.clone(true)] element unbind events from original element

Reported by: bumper Owned by: bumper
Priority: low Milestone: None
Component: manipulation Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:
Description

hi,

I find this annoying bug.

When I clone element with ".clone(true)" method, then I remove it with ".remove()", it unbind all events from original element.

When ".detach()" was used for removing it's ok, but it shouldn't work that way.

Attachments (0)
Change History (4)

Changed October 06, 2011 01:30PM UTC by rwaldron comment:1

component: unfiledmanipulation
owner: → bumper
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/

Open the link and click to "Fork" (in the top menu) to get started.

Changed October 21, 2011 08:04AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

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!

Changed April 02, 2012 09:00AM UTC by allan.jardine@sprymedia.co.uk comment:3

I've just stumbled across this as well. I've created a JSFiddle which shows the issue: http://jsfiddle.net/2jFDd/2/ .

Note that this problem occurs only in IE6/7 and only if you use the DOM method cloneNode - it does not occur if you use $().clone. IE8+ and all other browsers appear to get this right, so it looks to me that internally when cloning nodes IE is keeping a reference to the original :-(.

Changed April 02, 2012 02:54PM UTC by dmethvin comment:4

If you use oldIE DOM.cloneNode() directly then yes, that will circumvent all the hard work jQuery does for you under the covers. So don't do that.