aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index acfd2a3b8..c28bf1821 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -622,12 +622,15 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
}
}
- if (this.props.selectOnLoad) {
- if (!this.props.isOverlay) this.props.select(false);
- else this._editorView!.focus();
+ if (this.props.Document[Id] == FormattedTextBox.SelectOnLoad) {
+ FormattedTextBox.SelectOnLoad = "";
+ this.props.select(false);
}
+ else if (this.props.isOverlay) this._editorView!.focus();
}
+ public static SelectOnLoad = "";
+
componentWillUnmount() {
this._editorView && this._editorView.destroy();
this._reactionDisposer && this._reactionDisposer();