diff --git a/.changeset/rare-points-change.md b/.changeset/rare-points-change.md index 9ce10e25..28a38179 100644 --- a/.changeset/rare-points-change.md +++ b/.changeset/rare-points-change.md @@ -1,5 +1,5 @@ --- -'@reactflow/core': major +'@reactflow/core': patch --- track modifier keys on useKeypress diff --git a/.changeset/real-cats-sneeze.md b/.changeset/real-cats-sneeze.md new file mode 100644 index 00000000..3f8f02bc --- /dev/null +++ b/.changeset/real-cats-sneeze.md @@ -0,0 +1,5 @@ +--- +'@reactflow/core': patch +--- + +fix: check if handle is connectable diff --git a/packages/core/src/components/Handle/utils.ts b/packages/core/src/components/Handle/utils.ts index 58263781..bfd181e1 100644 --- a/packages/core/src/components/Handle/utils.ts +++ b/packages/core/src/components/Handle/utils.ts @@ -104,9 +104,10 @@ export function isValidHandle( // in strict mode we don't allow target to target or source to source connections const isValid = - connectionMode === ConnectionMode.Strict + handleToCheck.classList.contains('connectable') && + (connectionMode === ConnectionMode.Strict ? (isTarget && handleType === 'source') || (!isTarget && handleType === 'target') - : handleNodeId !== fromNodeId || handleId !== fromHandleId; + : handleNodeId !== fromNodeId || handleId !== fromHandleId); if (isValid) { result.isValid = isValidConnection(connection);