aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/WebBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r--src/client/views/nodes/WebBox.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx
index abda0ed3a..663a8b8e4 100644
--- a/src/client/views/nodes/WebBox.tsx
+++ b/src/client/views/nodes/WebBox.tsx
@@ -30,6 +30,7 @@ import { DocAfterFocusFunc } from "./DocumentView";
import { FieldView, FieldViewProps } from './FieldView';
import "./WebBox.scss";
import React = require("react");
+import { LinkDocPreview } from "./LinkDocPreview";
const htmlToText = require("html-to-text");
type WebDocument = makeInterface<[typeof documentSchema]>;
@@ -119,7 +120,9 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum
this._initialScroll !== undefined && (this._initialScroll = scrollTo);
this._ignoreScroll = true;
this.goTo(scrollTo, focusSpeed = smooth ? 500 : 0);
- this.layoutDoc._scrollTop = scrollTo;
+ if (!LinkDocPreview.LinkInfo) {
+ this.layoutDoc._scrollTop = scrollTo;
+ }
this._ignoreScroll = false;
}
} else {