From cad1fac00c7055494b62921a876c20b13626d2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E6=A2=A6?= Date: Tue, 18 Nov 2025 19:22:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=BD=B1=E5=93=8Donblur=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/x-flow/src/XFlow.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/x-flow/src/XFlow.tsx b/packages/x-flow/src/XFlow.tsx index 62c620001..a8db6226c 100644 --- a/packages/x-flow/src/XFlow.tsx +++ b/packages/x-flow/src/XFlow.tsx @@ -129,6 +129,7 @@ const XFlow: FC = memo(props => { if ((e.key === 's' || e.key === 'S') && (e.ctrlKey || e.metaKey)) e.preventDefault(); if ((e.key === 'c' || e.key === 'C') && (e.ctrlKey || e.metaKey)) { + const latestNodes = storeApi.getState().nodes; let isNodeCopyEvent = false; if (e.target instanceof HTMLElement) { @@ -147,7 +148,6 @@ const XFlow: FC = memo(props => { } } const selectedNode = latestNodes?.find(node => node.selected); - if (isNodeCopyEvent && selectedNode?.id) { const nodeType = selectedNode?.data?._nodeType; if (isString(nodeType) && nodeType) { @@ -334,9 +334,6 @@ const XFlow: FC = memo(props => { id="xflow-container" ref={workflowContainerRef} tabIndex={0} - onMouseDown={() => { - workflowContainerRef.current?.focus(); - }} >