From 69868b04b7d2ffcf12aed0ca1b724d9596456c80 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 3 Sep 2020 12:44:58 -0400
Subject: made import stack non-selectable

---
 src/client/views/MainView.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'src/client/views/MainView.tsx')

diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index a87a07b62..f9b3b1da8 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -170,6 +170,14 @@ export class MainView extends React.Component {
         window.addEventListener("drop", e => e.preventDefault(), false);  // prevent default behavior of navigating to a new web page
         window.addEventListener("dragover", e => e.preventDefault(), false);
         document.addEventListener("pointerdown", this.globalPointerDown);
+        document.addEventListener("click", (e: MouseEvent) => {
+            if (!e.cancelBubble) {
+                const pathstr = (e as any)?.path.map((p: any) => p.classList?.toString()).join();
+                if (pathstr.includes("libraryFlyout")) {
+                    SelectionManager.DeselectAll();
+                }
+            }
+        });
     }
 
     initAuthenticationRouters = async () => {
-- 
cgit v1.2.3-70-g09d2

