diff options
author | bobzel <zzzman@gmail.com> | 2025-03-04 14:50:32 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-04 14:50:32 -0500 |
commit | 1fe6548a909d63566f0fe37b02ba9cb5eb913caa (patch) | |
tree | e00a4073e10c53f5124976babfdb579a4a6bdf58 | |
parent | 1e23a0cced1aeafa81843a82cd8208e0f8713a67 (diff) |
fixed border / text autoheight bug.
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index da2131940..e9c521aa0 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1283,13 +1283,13 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB this._disposers.componentHeights = reaction( // set the document height when one of the component heights changes and layout_autoHeight is on () => ({ border: this._props.PanelHeight(), sidebarHeight: this.sidebarHeight, textHeight: this.textHeight, layoutAutoHeight: this.layout_autoHeight, marginsHeight: this.layout_autoHeightMargins }), - ({ sidebarHeight, textHeight, layoutAutoHeight, marginsHeight }) => { + ({ border, sidebarHeight, textHeight, layoutAutoHeight, marginsHeight }) => { const newHeight = this.contentScaling * (marginsHeight + Math.max(sidebarHeight, textHeight)); if ( (!Array.from(FormattedTextBox._globalHighlights).includes('Bold Text') || this._props.isSelected()) && // layoutAutoHeight && newHeight && - newHeight !== this.layoutDoc.height && + (newHeight !== this.layoutDoc.height || border < NumCast(this.layoutDoc.height)) && !this._props.dontRegisterView ) { this._props.setHeight?.(newHeight); |