Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

fix(automations): reliably open a node's config when switching nodes

Paulo Castellanob2932262cf65
diff --git a/resources/js/pages/automations/Form.vue b/resources/js/pages/automations/Form.vue
index b3afe3676..6a2748f61 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