From becba0a82b343653b3393138f33fa38c6acebca8 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 10 Jun 2026 09:36:28 +0200 Subject: [PATCH] :bug: Fix frame inner strokes ignoring focus mode in wasm renderer --- render-wasm/src/render.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/render-wasm/src/render.rs b/render-wasm/src/render.rs index 6a64ef2026..fb3fffecd8 100644 --- a/render-wasm/src/render.rs +++ b/render-wasm/src/render.rs @@ -2584,8 +2584,11 @@ impl RenderState { // Strokes are drawn over children for clipped frames (all strokes), and for non-clipped // frames with inner strokes (inner strokes only — non-inner were rendered before children). - let needs_exit_strokes = element.clip() - || (matches!(element.shape_type, Type::Frame(_)) && element.has_inner_stroke()); + // Skip when focus mode excludes this subtree (focus_mode.exit runs after this, so + // is_active() still reflects this element's focus state here). + let needs_exit_strokes = self.focus_mode.is_active() + && (element.clip() + || (matches!(element.shape_type, Type::Frame(_)) && element.has_inner_stroke())); if needs_exit_strokes { let mut element_strokes: Cow = Cow::Borrowed(element);