diff options
author | bob <bcz@cs.brown.edu> | 2019-05-30 13:47:53 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-30 13:47:53 -0400 |
commit | 890a40ef8cc2efa7beea5722301b59ede5141238 (patch) | |
tree | dd2e02a4d3e517a07c0e37512f738d2140f6709a /src/client/views/MainView.tsx | |
parent | 37e16bb59a38c000ba80312a0661e1f54c93f3c6 (diff) |
fixed context menus and tree view jitter.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 74dafadc4..a093ffdec 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -104,7 +104,9 @@ export class MainView extends React.Component { }, false); // drag event handler // click interactions for the context menu document.addEventListener("pointerdown", action(function (e: PointerEvent) { - if (!ContextMenu.Instance.intersects(e.pageX, e.pageY)) { + + const targets = document.elementsFromPoint(e.x, e.y); + if (targets && targets.length && targets[0].className.toString().indexOf("contextMenu") === -1) { ContextMenu.Instance.clearItems(); } }), true); @@ -163,7 +165,7 @@ export class MainView extends React.Component { } openNotifsCol = () => { - if (this._notifsCol) { + if (this._notifsCol && CollectionDockingView.Instance) { CollectionDockingView.Instance.AddRightSplit(this._notifsCol); } } |