Added open check for shortcuts on map select modal

This commit is contained in:
Mitchell McCaffrey 2020-10-01 16:41:57 +10:00
parent a412cbde9d
commit 0174acbde0

View File

@ -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");
}