From a6745426e4b6de39a17a722a377e44b5bcdd90bd Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sat, 8 Feb 2020 17:45:06 -0500 Subject: prevent clicks from passing into document contents when in time/pivot view --- src/client/views/nodes/DocumentView.scss | 8 ++++++++ src/client/views/nodes/DocumentView.tsx | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/nodes/DocumentView.scss b/src/client/views/nodes/DocumentView.scss index 2ce56c73d..b9045b11e 100644 --- a/src/client/views/nodes/DocumentView.scss +++ b/src/client/views/nodes/DocumentView.scss @@ -42,6 +42,14 @@ z-index: 1; } + .documentView-contentBlocker { + pointer-events: all; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + } .documentView-styleWrapper { position: absolute; display: inline-block; diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index dcdce5fce..14db9cffa 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -983,7 +983,11 @@ export class DocumentView extends DocComponent(Docu height: "100%", opacity: this.Document.opacity }}> - {this.innards} + {this.onClickHandler ? <> + {this.innards} +
+ : + this.innards}
; } } -- cgit v1.2.3-70-g09d2 From b5f34c5e702c3796e0f346ee2887a92332db9778 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sat, 8 Feb 2020 22:18:17 -0500 Subject: from last.. --- src/client/views/nodes/DocumentView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 14db9cffa..787f6b79b 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -983,11 +983,11 @@ export class DocumentView extends DocComponent(Docu height: "100%", opacity: this.Document.opacity }}> - {this.onClickHandler ? <> + {this.onClickHandler && this.props.ContainingCollectionView?.props.Document._viewType === CollectionViewType.Time ? <> {this.innards} -
+
: - this.innards} + this.innards}
; } } -- cgit v1.2.3-70-g09d2