aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-11 17:22:03 -0400
committerbobzel <zzzman@gmail.com>2020-10-11 17:22:03 -0400
commit3256d0f42401b8dd8745e7f32c25033e118b444b (patch)
treeccac3211edde4ce003a8bed0aba51dd76e8205f7 /src/client/views/nodes/formattedText/FormattedTextBox.tsx
parent65448167a4db396b2ee3c56d870233f8ac182eb6 (diff)
removed setting fields to undefined when Acl is Private in hopes of not losing data when permissions are changed. prevented server writes on startup by making renderContentBounds setting a reaction, and making linearView not resize if documents are still promises and make text boxes not flip-flop their height all the time.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index 94a11e3ac..da797eda0 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -1514,7 +1514,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
@action
tryUpdateHeight(limitHeight?: number) {
let scrollHeight = this.ProseRef?.scrollHeight || 0;
- this.rootDoc[this.fieldKey + "-height"] = 0;
if (this.props.renderDepth && this.layoutDoc._autoHeight && !this.props.ignoreAutoHeight && scrollHeight && !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
scrollHeight = scrollHeight * NumCast(this.layoutDoc._viewScale, 1);
if (limitHeight && scrollHeight > limitHeight) {
@@ -1545,7 +1544,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
this.rootDoc[this.fieldKey + "-height"] = finalHeight;
} catch (e) { console.log("Error in tryUpdateHeight"); }
}
- }
+ } else this.rootDoc[this.fieldKey + "-height"] = 0;
}
@computed get audioHandle() {