aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-07-03 21:02:48 -0400
committerbobzel <zzzman@gmail.com>2022-07-03 21:02:48 -0400
commit3419d46a569da7ae8899588251426b82996ca523 (patch)
tree80d39e6f86c6b5ed0d39bfe2d53a656f24a633ed /src
parent4710ba982c5fd974e7edf06b35eb9199584eb033 (diff)
from last
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 83f5198a9..2ae0c01ef 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -173,7 +173,7 @@ export class CollectionView extends ViewBoxAnnotatableComponent<ViewBoxAnnotatab
onContextMenu = (e: React.MouseEvent): void => {
const cm = ContextMenu.Instance;
- if (e.nativeEvent.cancelBubble) return;
+ 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);