From 90cd1e7bd0df3ae82249247a851558a00a7b3ff5 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Thu, 19 Dec 2024 16:14:05 +0100 Subject: [PATCH] fix(navigation/movecanvas): hook up with canvas focused state Related to https://github.com/bpmn-io/diagram-js/pull/662 --- lib/navigation/movecanvas/MoveCanvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/navigation/movecanvas/MoveCanvas.js b/lib/navigation/movecanvas/MoveCanvas.js index 255ddffbe..95189fb1d 100644 --- a/lib/navigation/movecanvas/MoveCanvas.js +++ b/lib/navigation/movecanvas/MoveCanvas.js @@ -43,7 +43,7 @@ export default function MoveCanvas(eventBus, canvas) { // allow others to hook into the event before us though // (dragging / element moving will do this) eventBus.on('element.mousedown', 500, function(e) { - return handleStart(e.originalEvent); + return canvas.isFocused() && handleStart(e.originalEvent); });