Browse Source

fix: stop click event bubbling in FlowNodeCard to allow node selection

Node selection was immediately cleared because onMouseDown set the
selectedNodeId but the click event bubbled up to the canvas which
reset it to null. Adding onClick stopPropagation fixes node properties
panel visibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tony T 5 days ago
parent
commit
26ea965c07
1 changed files with 1 additions and 0 deletions
  1. 1 0
      client/src/pages/WorkflowDesigner.tsx

+ 1 - 0
client/src/pages/WorkflowDesigner.tsx

@@ -328,6 +328,7 @@ function FlowNodeCard({
       className="absolute cursor-move select-none"
       style={{ left: node.x, top: node.y, zIndex: isSelected ? 20 : 10 }}
       onMouseDown={(e) => { e.stopPropagation(); onDragStart(e); onSelect(); }}
+      onClick={(e) => e.stopPropagation()}
     >
       <div
         className="w-44 rounded-xl border-2 shadow-sm transition-shadow hover:shadow-md overflow-hidden"