diff options
author | bob <bcz@cs.brown.edu> | 2019-09-13 18:51:13 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-13 18:51:13 -0400 |
commit | 8a4163eedcfd37a5e245c710ffc674c1d16088f8 (patch) | |
tree | d36bbd6ff35a53f6efb87fb12112326e2fb7fb41 /src/client/views/nodes/DocumentView.tsx | |
parent | dd7679295b84ceba49b8d581bb64f97cc1a86fbb (diff) |
fixed applying template to template
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 591a507eb..3dd384c80 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -285,7 +285,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu } onClick = async (e: React.MouseEvent) => { - if (e.nativeEvent.cancelBubble) return; // needed because EditableView may stopPropagation which won't apparently stop this event from firing. + if (e.nativeEvent.cancelBubble || SelectionManager.IsSelected(this)) return; // needed because EditableView may stopPropagation which won't apparently stop this event from firing. if (this.onClickHandler && this.onClickHandler.script) { e.stopPropagation(); this.onClickHandler.script.run({ this: this.props.Document.isTemplate && this.props.DataDoc ? this.props.DataDoc : this.props.Document }); |