New pre-1.9 .replaceWith() behavior leaks data and events
|Reported by:||dmethvin||Owned by:||dmethvin|
The changes to 1.9 .replaceWith() that update the set for a disconnected element can leak jQuery data and events because the element is updated in the set without calling .remove() on the element in the set.
Upon reflection, I think it's a mistake to attempt to update the set anyway, since we always .pushStack() in those cases. So I think we should do the same as .before() or .after() and simply ignore disconnected elements.
Change History (4)
comment:1 Changed 4 years ago by dmethvin
- Component changed from unfiled to manipulation
- Milestone changed from None to 1.9
- Owner set to dmethvin
- Priority changed from undecided to high
- Status changed from new to assigned
- Version changed from 1.8.3 to git
comment:3 Changed 4 years ago by Dave Methvin
- Resolution set to fixed
- Status changed from assigned to closed