aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-07-01 13:14:30 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-07-01 13:14:30 -0500
commit92b5c8bc048190ac6c90a6fdf0f04b9f053f412f (patch)
tree95c95eed84fa4018e492f5ec8ad036bffc2772b3 /src/client/views/GlobalKeyHandler.ts
parent581ba904dc9bd02f6e2d81f42c45f38f6ad26cab (diff)
parentf38485f2778c9dbcc4dd663527c58ea450acb832 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_linking
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index e3546dece..c85849adb 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -20,6 +20,7 @@ import { MainView } from "./MainView";
import { DocumentView } from "./nodes/DocumentView";
import { DocumentLinksButton } from "./nodes/DocumentLinksButton";
import PDFMenu from "./pdf/PDFMenu";
+import { ContextMenu } from "./ContextMenu";
const modifiers = ["control", "meta", "shift", "alt"];
type KeyHandler = (keycode: string, e: KeyboardEvent) => KeyControlInfo | Promise<KeyControlInfo>;
@@ -81,16 +82,17 @@ export default class KeyManager {
DocumentLinksButton.StartLink = undefined;
const main = MainView.Instance;
Doc.SetSelectedTool(InkTool.None);
+ var doDeselect = true;
if (main.isPointerDown) {
DragManager.AbortDrag();
} else {
if (CollectionDockingView.Instance.HasFullScreen()) {
CollectionDockingView.Instance.CloseFullScreen();
} else {
- SelectionManager.DeselectAll();
+ doDeselect = !ContextMenu.Instance.closeMenu();
}
}
- SelectionManager.DeselectAll();
+ doDeselect && SelectionManager.DeselectAll();
DictationManager.Controls.stop();
// RecommendationsBox.Instance.closeMenu();
GoogleAuthenticationManager.Instance.cancel();