From b2932262cf6561af8a3d5dadbf084af8630e9234 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Tue, 16 Jun 2026 11:26:05 -0300 Subject: [PATCH] fix(automations): reliably open a node's config when switching nodes A click with a few px of jitter crossed Vue Flow's 1px drag threshold and was treated as a drag, so onNodeClick never fired and the config panel didn't switch between nodes. Raise nodeDragThreshold to 5 so normal clicks stay clicks, and also select the node on drag start as a safety net. --- resources/js/pages/automations/Form.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/js/pages/automations/Form.vue b/resources/js/pages/automations/Form.vue index b3afe367..6a2748f6 100644 --- a/resources/js/pages/automations/Form.vue +++ b/resources/js/pages/automations/Form.vue @@ -206,6 +206,11 @@ onConnect((connection: Connection) => { let dragStartPosition: XYPosition | null = null; onNodeDragStart(({ node }) => { dragStartPosition = { ...node.position }; + // A click that moves more than Vue Flow's drag threshold (1px) registers as a + // drag, not a click, so onNodeClick never fires. Select here too, otherwise + // switching between nodes intermittently fails to open the grabbed node's config. + selectedNodeId.value = node.id; + selectedEdgeId.value = null; }); onNodeDragStop(({ node }) => { if (!dragStartPosition) return; @@ -483,6 +488,7 @@ const defaultEdgeOptions = { :default-edge-options="defaultEdgeOptions" :connection-mode="ConnectionMode.Loose" :delete-key-code="null" + :node-drag-threshold="5" :snap-to-grid="true" :snap-grid="[16, 16]" fit-view-on-init