diff --git a/src/modals/SelectMapModal.js b/src/modals/SelectMapModal.js index 7b6897f..afdcf7d 100644 --- a/src/modals/SelectMapModal.js +++ b/src/modals/SelectMapModal.js @@ -362,6 +362,9 @@ function SelectMapModal({ * Shortcuts */ function handleKeyDown({ key }) { + if (!isOpen) { + return; + } if (key === "Shift") { setSelectMode("range"); } @@ -371,6 +374,9 @@ function SelectMapModal({ } function handleKeyUp({ key }) { + if (!isOpen) { + return; + } if (key === "Shift" && selectMode === "range") { setSelectMode("single"); }