Răsfoiți Sursa

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 zile în urmă
părinte
comite
26ea965c07
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  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"