瀏覽代碼

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 天之前
父節點
當前提交
26ea965c07
共有 1 個文件被更改,包括 1 次插入0 次删除
  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"