From 988389bedf0c9c8f8f499219baa496ce265923d8 Mon Sep 17 00:00:00 2001 From: moklick Date: Thu, 1 Oct 2020 17:59:51 +0200 Subject: [PATCH] refactor(flows): support muliple flows on one site --- src/components/Handle/BaseHandle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Handle/BaseHandle.tsx b/src/components/Handle/BaseHandle.tsx index 4b432557..e5250cec 100644 --- a/src/components/Handle/BaseHandle.tsx +++ b/src/components/Handle/BaseHandle.tsx @@ -52,7 +52,7 @@ function onMouseDown( onConnectStop?: OnConnectStopFunc, onConnectEnd?: OnConnectEndFunc ): void { - const reactFlowNode = document.querySelector('.react-flow'); + const reactFlowNode = (event.target as Element).closest('.react-flow'); if (!reactFlowNode) { return;