Bug Tracker

Opened 11 years ago

Closed 11 years ago

#3790 closed bug (invalid)

after does not always removes the argument from its original position in the Dom, as JavaScript's insertBefore does.

Reported by: ericvandervelden Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: insertBefore Cc:
Blocked by: Blocking:

Description

JavaScript's insertBefore removes the element which it inserts from its original position in the DOM. Now for example $('p').after(elem) clones elem when the list $('p') has length>1. This happens in jQuery.fn.domManip. Probably because insertBefore will be called more then once. But finally elem will not be removed from its original position in the DOM, because it itself is not a argument of insertBefore, its clones are . When the list $('p') has length=1, it is removed, because is is itself the argument of insertBefore. Probably elem should always be removed from its original position in the DOM by after (and before, ...)

Change History (1)

comment:1 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.