aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/ContextMenu.tsx23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx
index e68e5c73f..0a8c98ec9 100644
--- a/src/client/views/ContextMenu.tsx
+++ b/src/client/views/ContextMenu.tsx
@@ -36,7 +36,12 @@ export class ContextMenu extends React.Component {
}
componentDidMount = () => {
-
+ document.addEventListener("pointerdown", e => {
+ this._mouseDown = true;
+ });
+ document.addEventListener("pointerup", e => {
+ this._mouseDown = false;
+ })
}
@action
@@ -85,14 +90,20 @@ export class ContextMenu extends React.Component {
//maxX and maxY will change if the UI/font size changes, but will work for any amount
//of items added to the menu
- console.log("opening?")
+ if (!this._mouseDown) {
+ this._pageX = x;
+ this._pageY = y;
+ this._searchString = "";
+ this._display = true;
+ }
- this._pageX = x;
- this._pageY = y;
- this._searchString = "";
+ // this._pageX = x;
+ // this._pageY = y;
+
+ // this._searchString = "";
- this._display = true;
+ // this._display = true;
}
@action