From 40a5d4edebf06e43ee77de8c30d8d8eddf4343dd Mon Sep 17 00:00:00 2001 From: bruno Date: Sun, 12 Jul 2026 18:01:36 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20@contextmenu.prevent=20remis=20(avait=20?= =?UTF-8?q?=C3=A9t=C3=A9=20perdu=20lors=20du=20revert)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Erreur critique: @contextmenu.prevent="onContextMenu" manquait → le handler n'était JAMAIS appelé par Alpine - Rajouté @contextmenu.prevent sur ws-split (entre @keydown et @click.self) - ctxMenu utilise mutations individuelles (pas de remplacement d'objet) pour une meilleure réactivité Alpine - @click.self conserve la fermeture en cliquant sur le fond du workspace --- app/main.py | 2 +- app/templates/local_workspace.html | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/main.py b/app/main.py index cf3370f..b27680f 100644 --- a/app/main.py +++ b/app/main.py @@ -39,7 +39,7 @@ async def lifespan(_app: FastAPI): app = FastAPI( title="FlowDeck", - version="2.4.3", + version="2.4.4", docs_url="/docs" if settings.log_level == "DEBUG" else None, redoc_url=None, lifespan=lifespan, diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html index 5cea4fa..8249c9e 100644 --- a/app/templates/local_workspace.html +++ b/app/templates/local_workspace.html @@ -341,6 +341,7 @@ @dragleave="onDragLeave($event)" @drop.prevent="onDrop($event)" @keydown="onKeydown($event)" + @contextmenu.prevent="onContextMenu($event)" @click.self="ctxMenu.visible = false" tabindex="0" x-ref="layout"> @@ -1267,13 +1268,11 @@ document.addEventListener('alpine:init', function() { if (!id) { this.ctxMenu.visible = false; return; } var node = this._findNodeById(this.displayTree, id); if (!node) { this.ctxMenu.visible = false; return; } - this.ctxMenu = { - visible: true, - x: ev.clientX, - y: ev.clientY, - node: node, - tags: [...(node.tags||[])] - }; + this.ctxMenu.visible = true; + this.ctxMenu.x = ev.clientX; + this.ctxMenu.y = ev.clientY; + this.ctxMenu.node = node; + this.ctxMenu.tags = [...(node.tags||[])]; this.ctxTagAdding = false; this.ctxTagExistingOpen = false; this.ctxNewTagColor = '#787774';