Side navigation
#3790 closed bug (invalid)
Opened January 06, 2009 02:45PM UTC
Closed January 07, 2009 01:45AM UTC
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, ...)
Attachments (0)
Change History (1)
Changed January 07, 2009 01:45AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
See this thread:
http://groups.google.com/group/jquery-en/browse_frm/thread/498c95e920a0c3d?q=#85833f44e69e8c6c