From 2a400ae06c5fa49fd84bba8aca33a78c0977aa5d Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Mon, 29 Jul 2024 12:47:22 +0200 Subject: [PATCH] xilem_web: Fix #465, by actually replacing the old element in the DOM-tree --- xilem_web/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xilem_web/src/lib.rs b/xilem_web/src/lib.rs index cf4f5b567..dd96800c8 100644 --- a/xilem_web/src/lib.rs +++ b/xilem_web/src/lib.rs @@ -222,6 +222,9 @@ impl AnyPod { this: &mut PodMut<'_, DynNode, Box>, node: Pod, ) { + this.parent + .replace_child(node.node.as_ref(), this.node.as_ref()) + .unwrap_throw(); this.node.inner = Box::new(node.node); *this.props = Box::new(node.props); }