Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/x-flow/src/XFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const XFlow: FC<FlowProps> = 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) {
Expand All @@ -147,7 +148,6 @@ const XFlow: FC<FlowProps> = memo(props => {
}
}
const selectedNode = latestNodes?.find(node => node.selected);

if (isNodeCopyEvent && selectedNode?.id) {
const nodeType = selectedNode?.data?._nodeType;
if (isString(nodeType) && nodeType) {
Expand Down Expand Up @@ -334,9 +334,6 @@ const XFlow: FC<FlowProps> = memo(props => {
id="xflow-container"
ref={workflowContainerRef}
tabIndex={0}
onMouseDown={() => {
workflowContainerRef.current?.focus();
}}
>
<ReactFlow
panOnDrag={panOnDrag}
Expand Down
Loading