diff options
author | bobzel <zzzman@gmail.com> | 2024-04-01 11:21:05 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-01 11:21:05 -0400 |
commit | 5e865b0a96c7b13e538d159baea0c10416bef921 (patch) | |
tree | baccaf2a2940d6b9fbd53eebd7e087f521bb4291 /src | |
parent | e4854bdb361f1d9e0ae85ee46327e2919117fc48 (diff) |
forgot these from last - fixes forced text scroll from pres trail.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index a78d8363e..269a114bb 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1309,15 +1309,15 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB this._disposers.scroll = reaction( () => NumCast(this.layoutDoc._layout_scrollTop), pos => { - if (!this._ignoreScroll && this.ProseRef && !this._props.dontSelectOnLoad) { + if (!this._ignoreScroll && this._scrollRef && !this._props.dontSelectOnLoad) { const viewTrans = quickScroll ?? StrCast(this.Document._viewTransition); const durationMiliStr = viewTrans.match(/([0-9]*)ms/); const durationSecStr = viewTrans.match(/([0-9.]*)s/); const duration = durationMiliStr ? Number(durationMiliStr[1]) : durationSecStr ? Number(durationSecStr[1]) * 1000 : 0; if (duration) { - this._scrollStopper = smoothScroll(duration, this.ProseRef, Math.abs(pos || 0), 'ease', this._scrollStopper); + this._scrollStopper = smoothScroll(duration, this._scrollRef, Math.abs(pos || 0), 'ease', this._scrollStopper); } else { - this.ProseRef.scrollTo({ top: pos }); + this._scrollRef.scrollTo({ top: pos }); } } }, |