diff options
author | bobzel <zzzman@gmail.com> | 2021-02-12 16:45:06 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-12 16:45:06 -0500 |
commit | 926665e2367ff6a201a48618df6f7985ddbcb4b0 (patch) | |
tree | 53d2771855ba763851ec1da5cce7f6357d42e373 /src/client/views/nodes/WebBox.tsx | |
parent | ffeada4e258e1786536b579b17798932bf4b8a8a (diff) |
fixed previewing/scrollingto targets in web boxes and PDFs. fixed following link to textanchor when rtf doc is not displayed.
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 5 |
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 { |