Moved to handling keyboard shortcuts on the document body

Also removed shortcut text input checking to map interaction component
This commit is contained in:
Mitchell McCaffrey
2020-07-18 11:06:02 +10:00
parent 17043745de
commit 44e6a34aba
3 changed files with 82 additions and 57 deletions

View File

@@ -79,13 +79,7 @@ function MapMenu({
}}
contentRef={handleModalContent}
>
{/* Stop keyboard events when modal is open to prevent shortcuts from triggering */}
<div
onKeyDown={(e) => e.stopPropagation()}
onKeyUp={(e) => e.stopPropagation()}
>
{children}
</div>
{children}
</Modal>
);
}