From da5a7450fcb6785c9827ce39e4c4652f1c77468c Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sun, 5 Sep 2021 14:29:02 -0400
Subject: prevent linear menu from displaying a context menu

---
 .../collections/collectionLinearView/CollectionLinearView.tsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/collectionLinearView/CollectionLinearView.tsx')

diff --git a/src/client/views/collections/collectionLinearView/CollectionLinearView.tsx b/src/client/views/collections/collectionLinearView/CollectionLinearView.tsx
index f3ffb4e0b..8d7809cdb 100644
--- a/src/client/views/collections/collectionLinearView/CollectionLinearView.tsx
+++ b/src/client/views/collections/collectionLinearView/CollectionLinearView.tsx
@@ -108,6 +108,12 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
         }
     }
 
+    myContextMenu = (e: React.MouseEvent) => {
+        console.log("STOPPING");
+        e.stopPropagation();
+        e.preventDefault();
+    }
+
     render() {
         const guid = Utils.GenerateGuid(); // Generate a unique ID to use as the label
         const flexDir: any = StrCast(this.Document.flexDirection); // Specify direction of linear view content
@@ -126,12 +132,13 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
             }}
             onPointerDown={e => e.stopPropagation()} >
             <div className="collectionLinearView-menuOpener">
-                {BoolCast(this.layoutDoc.linearViewIsExpanded) ? icon ? icon : <FontAwesomeIcon icon={"minus"}/> : icon ? icon :  <FontAwesomeIcon icon={"plus"}/>}
+                {BoolCast(this.layoutDoc.linearViewIsExpanded) ? icon ? icon : <FontAwesomeIcon icon={"minus"} /> : icon ? icon : <FontAwesomeIcon icon={"plus"} />}
             </div>
         </label>;
 
         return <div className={`collectionLinearView-outer ${this.layoutDoc.linearViewSubMenu}`} style={{ backgroundColor: BoolCast(this.layoutDoc.linearViewIsExpanded) ? undefined : "transparent" }}>
-            <div className="collectionLinearView" ref={this.createDashEventsTarget} >
+            <div className="collectionLinearView" ref={this.createDashEventsTarget}
+                onContextMenu={this.myContextMenu} >
                 {!expandable ? (null) : <Tooltip title={<><div className="dash-tooltip">{BoolCast(this.props.Document.linearViewIsExpanded) ? "Close" : "Open"}</div></>} placement="top">
                     {menuOpener}
                 </Tooltip>}
-- 
cgit v1.2.3-70-g09d2

