diff options
author | bobzel <zzzman@gmail.com> | 2021-03-29 20:36:47 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-29 20:36:47 -0400 |
commit | 589f07ea018368057fe80b136c3fd2153efe0fcb (patch) | |
tree | 06e9a1749551397d6ec270da69a9cc2852955f33 /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 7db0fe589afa3281894afb0a0d3bd6b9983c9d33 (diff) |
fixed text input after changes to active/selected
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 28e58f6d8..7787dc3a6 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1422,9 +1422,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp const proseHeight = this.ProseRef?.scrollHeight || 0; const scrollHeight = this.ProseRef && Math.min(NumCast(this.layoutDoc.docMaxAutoHeight, proseHeight), proseHeight); if (scrollHeight && this.props.renderDepth && !this.props.dontRegisterView) { // if top === 0, then the text box is growing upward (as the overlay caption) which doesn't contribute to the height computation - const setScrollHeight = () => { - this.rootDoc[this.fieldKey + "-scrollHeight"] = scrollHeight; - }; + const setScrollHeight = () => this.rootDoc[this.fieldKey + "-scrollHeight"] = scrollHeight; if (this.rootDoc === this.layoutDoc.doc || this.layoutDoc.resolvedDataDoc) { setScrollHeight(); } else setTimeout(setScrollHeight, 10); // if we have a template that hasn't been resolved yet, we can't set the height or we'd be setting it on the unresolved template. So set a timeout and hope its arrived... |