fix(subflows): prevent cross-boundary connections on autoconnect drop between subflow blocks and regular blocks (#2366)

This commit is contained in:
Waleed
2025-12-13 17:38:59 -08:00
committed by GitHub
parent 95b9ca4670
commit 0fb084b9e4

View File

@@ -579,8 +579,10 @@ const WorkflowContent = React.memo(() => {
const node = nodeIndex.get(id)
if (!node) return false
// If dropping outside containers, ignore blocks that are inside a container
if (!containerAtPoint && blocks[id]?.data?.parentId) return false
const blockParentId = blocks[id]?.data?.parentId
const dropParentId = containerAtPoint?.loopId
if (dropParentId !== blockParentId) return false
return true
})
.map(([id, block]) => {