aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-07-05 10:15:54 -0400
committerbobzel <zzzman@gmail.com>2022-07-05 10:15:54 -0400
commitc1cd00c7664df694b867f4989a1f61d959390742 (patch)
tree29cfd0a7f9ed26ce2fd2eaf90549232e6c999c9d /src/client/views/collections/CollectionView.tsx
parent2917042be6dc9d05a1a6a8d9dd01d19f915f1b68 (diff)
parent3419d46a569da7ae8899588251426b82996ca523 (diff)
Merge branch 'master' into parker
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 59e22a48d..6583f6fca 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -178,6 +178,7 @@ export class CollectionView extends ViewBoxAnnotatableComponent<ViewBoxAnnotatab
onContextMenu = (e: React.MouseEvent): void => {
const cm = ContextMenu.Instance;
+ if (e.nativeEvent.cancelBubble) return; // nested calls to React to render can cause the same event to trigger in the outer view even if the inner view has handled it. This avoid CollectionDockingView menu options from being added when the event has been handled by a sub-document.
if (cm && !e.isPropagationStopped() && this.rootDoc[Id] !== CurrentUserUtils.MainDocId) { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7
this.setupViewTypes("UI Controls...", vtype => {
const newRendition = Doc.MakeAlias(this.rootDoc);