From 07058db9c217b3798c8e5605966f413edcf07e67 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Mon, 19 Jul 2021 11:01:45 +1000 Subject: [PATCH] Fix UI issue with pressing space with move tool selected --- src/components/map/MapInteraction.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/map/MapInteraction.tsx b/src/components/map/MapInteraction.tsx index 235b0c6..a14530b 100644 --- a/src/components/map/MapInteraction.tsx +++ b/src/components/map/MapInteraction.tsx @@ -135,6 +135,9 @@ function MapInteraction({ previousSelectedToolRef.current = selectedToolId; onSelectedToolChange("move"); } + if (!event.repeat && shortcuts.move(event) && selectedToolId === "move") { + previousSelectedToolRef.current = "move"; + } } function handleKeyUp(event: KeyboardEvent) {