aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2021-09-12 11:04:16 -0400
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2021-09-12 11:04:16 -0400
commit70449f72c7ae389bac78ef24b3842992d5a8d829 (patch)
tree1306daecfe6f5527ecd3336a6717b2e55085696d /src/client/views/nodes/DocumentView.tsx
parent939c7d092635e47e081aa8f047b73af36058f3b7 (diff)
parent9ac6931dabac40a7e530d144c1d1123548de373f (diff)
Merge branch 'master' into menu_updates_geireann
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index d88f1b9a4..5de4c2c4e 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -809,7 +809,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
</div>;
return <div className="documentView-contentsView"
style={{
- pointerEvents: (this.props.contentPointerEvents as any) || (this.isContentActive() ? "all" : "none"),
+ pointerEvents: this.rootDoc.type !== DocumentType.INK && ((this.props.contentPointerEvents as any) || (this.isContentActive())) ? "all" : "none",
height: this.headerMargin ? `calc(100% - ${this.headerMargin}px)` : undefined,
}}>
<DocumentContentsView key={1} {...this.props}
@@ -944,13 +944,13 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
const showTitleHover = this.ShowTitle?.includes(":hover");
const showCaption = !this.props.hideCaptions && this.Document._viewType !== CollectionViewType.Carousel ? StrCast(this.layoutDoc._showCaption) : undefined;
const captionView = !showCaption ? (null) :
- <div className="documentView-captionWrapper">
+ <div className="documentView-captionWrapper"
+ style={{ pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : this.isContentActive() || this.props.isDocumentActive?.() ? "all" : undefined, }}>
<FormattedTextBox {...OmitKeys(this.props, ['children']).omit}
yPadding={10}
xPadding={10}
fieldKey={showCaption}
fontSize={Math.min(32, 12 * this.props.ScreenToLocalTransform().Scale)}
- hideOnLeave={true}
styleProvider={this.captionStyleProvider}
dontRegisterView={true}
isContentActive={this.isContentActive}
@@ -965,7 +965,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
height: this.titleHeight,
color: lightOrDark(background),
background,
- pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : undefined,
+ pointerEvents: this.onClickHandler || this.Document.ignoreClick ? "none" : this.isContentActive() || this.props.isDocumentActive?.() ? "all" : undefined,
}}>
<EditableView ref={this._titleRef}
contents={showTitle.split(";").map(field => field.trim()).map(field => targetDoc[field]?.toString()).join("\\")}