From c2ff5ca1b6f49e0b54b4a42cba538f18e6a0e819 Mon Sep 17 00:00:00 2001 From: Dariusz Koryto Date: Fri, 16 Oct 2026 15:53:10 +0200 Subject: [PATCH] fix(diagram): keep the shape menu from blocking the editor (#595) The shape-library trigger opened its menu on every pointerenter. When the editor replaced the note list under a pointer that did not move, or when the pointer only passed over the toolbar, the menu opened by itself and stayed open. For mind maps and flowcharts that menu was modal, so the back-to-list button could not be pressed until the menu was closed. On touch screens pointerenter fires right before the pointerdown that toggles the menu, so a tap could open it and close it again. - Open the menu on hover only for mouse pointers. - Make the mind-map and flowchart insert menu non-modal, as the architecture library already is. --- apps/web/src/components/DiagramEditorPane.test.mjs | 9 ++++++++- apps/web/src/components/DiagramEditorPane.tsx | 2 +- apps/web/src/components/DiagramToolbar.tsx | 10 +++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/DiagramEditorPane.test.mjs b/apps/web/src/components/DiagramEditorPane.test.mjs index a5f4d6ac..9963c4cd 100644 --- a/apps/web/src/components/DiagramEditorPane.test.mjs +++ b/apps/web/src/components/DiagramEditorPane.test.mjs @@ -275,12 +275,19 @@ describe("diagram editor canvas surface", () => { test("reuses the architecture shape-library trigger across every diagram kind", () => { expect(toolbarSource).toContain("export const DiagramToolbarAddTrigger"); expect(toolbarSource).toContain(""); - expect(toolbarSource).toContain('