diff options
| author | Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> | 2021-07-31 22:16:18 -0700 |
|---|---|---|
| committer | Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> | 2021-07-31 22:16:18 -0700 |
| commit | 871205c74367b333eb59c3941be000092cab5e0d (patch) | |
| tree | d367a8c9a9a4e9a2b4e8e793ff78e92ef994a514 /src/client/views/nodes/WebBox.tsx | |
| parent | 7e11e24fcdd9c086d63c643d6ee092c952d2e327 (diff) | |
| parent | b1361eec6d3f554d4927931c339b5c169b9a54a7 (diff) | |
Merge branch 'master' into aubrey-bugfix
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
| -rw-r--r-- | src/client/views/nodes/WebBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index c60798c6d..f5b1f96f2 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -163,7 +163,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps if (this._sidebarRef?.current?.makeDocUnfiltered(doc)) return 1; if (doc !== this.rootDoc && this._outerRef.current) { const windowHeight = this.props.PanelHeight() / (this.props.scaling?.() || 1); - const scrollTo = doc.type === DocumentType.TEXTANCHOR ? NumCast(doc.y) : Utils.scrollIntoView(NumCast(doc.y), doc[HeightSym](), NumCast(this.layoutDoc._scrollTop), windowHeifht, windowHeight * .1); + const scrollTo = Utils.scrollIntoView(NumCast(doc.y), doc[HeightSym](), NumCast(this.layoutDoc._scrollTop), windowHeight, windowHeight * .1); if (scrollTo !== undefined) { const focusSpeed = smooth ? 500 : 0; this._initialScroll !== undefined && (this._initialScroll = scrollTo); |
