From fae27af1a57e88be628a77f9d0a8b1c9e5fe32e2 Mon Sep 17 00:00:00 2001
From: usodhi <61431818+usodhi@users.noreply.github.com>
Date: Sat, 4 Jul 2020 00:00:55 +0530
Subject: changed click to pointerdown

---
 src/client/views/MainViewModal.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/src/client/views/MainViewModal.tsx b/src/client/views/MainViewModal.tsx
index 6041593b8..2bdd159c9 100644
--- a/src/client/views/MainViewModal.tsx
+++ b/src/client/views/MainViewModal.tsx
@@ -23,20 +23,20 @@ export default class MainViewModal extends React.Component<MainViewOverlayProps>
 
     componentDidMount() {
 
-        document.removeEventListener("click", this.close);
+        document.removeEventListener("pointerdown", this.close);
 
         this.displayedListenerDisposer = reaction(() => this.props.isDisplayed, (isDisplayed) => {
-            if (isDisplayed) document.addEventListener("click", this.close);
-            else document.removeEventListener("click", this.close);
+            if (isDisplayed) document.addEventListener("pointerdown", this.close);
+            else document.removeEventListener("pointerdown", this.close);
         });
     }
 
     componentWillUnmount() {
         this.displayedListenerDisposer?.();
-        document.removeEventListener("click", this.close);
+        document.removeEventListener("pointerdown", this.close);
     }
 
-    close = (e: MouseEvent) => {
+    close = (e: PointerEvent) => {
 
         const { left, right, top, bottom } = this.ref.current!.getBoundingClientRect();
 
-- 
cgit v1.2.3-70-g09d2

