From 6063a45c3ca12a67acd73482174657151950c602 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 28 Jul 2026 10:26:31 +0200 Subject: [PATCH] :bug: Fix area selection aborted by select-shapes interrupt (#10870) * :bug: Fix area selection aborted by select-shapes interrupt Only emit :interrupt from select-shapes when edition mode is active. Unconditional :interrupt (from #10798) made drag-stopper cancel the marquee mid-drag. * :wrench: Fix text editor v2 fill e2e test on develop --- frontend/playwright/ui/specs/text-editor-v2.spec.js | 1 - frontend/src/app/main/data/workspace/selection.cljs | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/playwright/ui/specs/text-editor-v2.spec.js b/frontend/playwright/ui/specs/text-editor-v2.spec.js index 2219a4ea8c..a58c71dba4 100644 --- a/frontend/playwright/ui/specs/text-editor-v2.spec.js +++ b/frontend/playwright/ui/specs/text-editor-v2.spec.js @@ -344,7 +344,6 @@ test("Preserves empty fill after editing text without changes", async ({ page }) await workspace.createTextShape(190, 150, 300, 200, initialText); await workspace.textEditor.stopEditing(); - await workspace.page.getByRole('button', { name: 'Fill', exact: true }).click(); const fillColorButton = workspace.page.getByRole("button", { name: "#000000", diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index 3eab8b2d6b..36039f230b 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -275,7 +275,11 @@ ;; the event loop expand-s (->> (rx/of (dwc/expand-all-parents ids objects)) (rx/observe-on :async)) - interrupt-s (rx/of :interrupt ::dwsp/interrupt)] + ;; :interrupt aborts drag-stopper; only emit it when clearing edition + ;; (unconditional emit broke marquee selection after #10798). + interrupt-s (if (some? (dm/get-in state [:workspace-local :edition])) + (rx/of :interrupt ::dwsp/interrupt) + (rx/of ::dwsp/interrupt))] (rx/merge expand-s interrupt-s))))) (defn select-all