aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-05-08 02:51:21 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-05-08 02:51:21 -0400
commit1a8a370f67c3076d1b47c3bd8c3929d65badcfeb (patch)
treec5453718d6b8cd60d53a8eb74e13c33d5c524c23 /src/client/views/nodes/PDFBox.tsx
parent921c3b95b22d5e4125435abb45cd322fc170ccb3 (diff)
parenta61d794b7018f0ac9723ce2d3b93547ba11f444b (diff)
Merge branch 'nathan-starter' of https://github.com/brown-dash/Dash-Web into nathan-starter
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index 1dc194c42..7a89b143b 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -328,8 +328,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
setPdfViewer = (pdfViewer: PDFViewer) => {
this._pdfViewer = pdfViewer;
- const docView = this.DocumentView?.();
- if (this._initialScrollTarget && docView) {
+ if (this._initialScrollTarget) {
this.focus(this._initialScrollTarget, { instant: true });
this._initialScrollTarget = undefined;
}
@@ -559,7 +558,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
removeDocument={this.removeDocument}
/>
) : (
- <div onPointerDown={e => setupMoveUpEvents(this, e, returnFalse, emptyFunction, () => DocumentView.SelectView(this.DocumentView?.()!, false), true)}>
+ <div onPointerDown={e => setupMoveUpEvents(this, e, returnFalse, emptyFunction, () => this._props.select(false), true)}>
<ComponentTag
// eslint-disable-next-line react/jsx-props-no-spreading
{...this._props}