diff --git a/Cargo.toml b/Cargo.toml index e78b47d0..4ad3944e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ exclude = ["sites", "packages/blitz-wasm/guest", ".ps-observability", ".chuzz", resolver = "2" [workspace.package] -version = "0.4.9" +version = "0.4.10" license = "MIT OR Apache-2.0" homepage = "https://github.com/pathscale/ps-blitz" repository = "https://github.com/pathscale/ps-blitz" diff --git a/packages/blitz-dom/src/layout/damage.rs b/packages/blitz-dom/src/layout/damage.rs index fd90a1e2..5d1afb2a 100644 --- a/packages/blitz-dom/src/layout/damage.rs +++ b/packages/blitz-dom/src/layout/damage.rs @@ -1022,7 +1022,23 @@ impl BaseDocument { }; let mut hoisted = HoistedPaintChild::new(child_id, z_index, Position::Fixed); hoisted.position = position; - context.children.push(hoisted); + // Update in place, never append a second copy. + // + // This joins an ancestor context that is *already built*, so an + // incremental resolve that re-flushes this node reaches it again with + // the same child. Pushing unconditionally recorded the node twice, and + // two entries paint the same box twice: a hovered pill menu stacked its + // shadow, ~11.8k pixels darker each pass, with the DOM and layout still + // flat because the duplication is only in this paint list. + if let Some(existing) = context + .children + .iter_mut() + .find(|child| child.node_id == child_id) + { + *existing = hoisted; + } else { + context.children.push(hoisted); + } let mut context = self.nodes[host].stacking_context.take().unwrap(); context.sort(); context.compute_content_size(self);