소스 검색

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"