aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-19 11:55:52 -0500
committerbobzel <zzzman@gmail.com>2023-11-19 11:55:52 -0500
commit95ca3c2419a760970d56a4af656b28c4f3b6c073 (patch)
treed8afa191064d09cffce31eb912e0cb3fea915d62 /src/client/views/nodes/DocumentView.tsx
parent2b0e4ccc096998eb1d727f2e85ea8c1a63b27e08 (diff)
fixed creating anchors when pinning pdf/web/text doc with selection. fixed showing selected text overlay for text docs.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index a61396275..9d30a92b0 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1626,10 +1626,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
@action
componentDidMount() {
this.rootDoc[DocViews].add(this);
- this._disposers.updateContentsScript = reaction(
- () => ScriptCast(this.rootDoc.updateContentsScript)?.script?.run({ this: this.props.Document, self: Cast(this.rootDoc, Doc, null) || this.props.Document }).result,
- output => output
- );
+ this._disposers.updateContentsScript = reaction(() => ScriptCast(this.rootDoc.updateContentsScript)?.script?.run({ this: this.rootDoc, self: this.rootDoc }).result, emptyFunction);
this._disposers.height = reaction(
// increase max auto height if document has been resized to be greater than current max
() => NumCast(this.layoutDoc._height),