Inconsistent behavior with .replaceWith() and disconnected nodes.
|Reported by:||https://github.com/ironchefpython||Owned by:|
I noticed odd behavior using replaceWith on disconnected nodes. I use a lot of html fragments, and I was getting strange results depending on the presence or absence of text.
Here is the minimal test case:
> jQuery("<span></span>").replaceWith("<div></div>"); [<div></div>] >jQuery("<span>foo</span>").replaceWith("<div>bar</div>"); [<span>foo</span>]
This bug may be a duplicate of http://bugs.jquery.com/ticket/7246, however that was closed 15 months ago with no indication of if the non-deterministic behavior is intended.
Change History (5)
comment:1 Changed 4 years ago by timmywil
- Component changed from unfiled to manipulation
- Priority changed from undecided to low
- Status changed from new to open