diff options
author | bobzel <zzzman@gmail.com> | 2020-12-01 19:50:44 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-01 19:50:44 -0500 |
commit | 23290bd8a8d1cb1f1254a7b600bdc6f540caf52e (patch) | |
tree | b3f1e79dbfe429b4b6c5ff9156c2e24241a282a6 /src | |
parent | ea1e8b6c2d608219b4cf3f6cff69113310269f43 (diff) |
fixed formatted text box not to clear the richTextMenu when it blurs if it's still selected.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 5017d21f1..97a45892a 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1472,7 +1472,9 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp public static LiveTextUndo: UndoManager.Batch | undefined; public static HadSelection: boolean = false; onBlur = (e: any) => { - RichTextMenu.Instance?.updateMenu(undefined, undefined, undefined); + if (RichTextMenu.Instance?.view === this._editorView && !this.props.isSelected(true)) { + RichTextMenu.Instance?.updateMenu(undefined, undefined, undefined); + } FormattedTextBox.HadSelection = window.getSelection()?.toString() !== ""; this.endUndoTypingBatch(); this.doLinkOnDeselect(); |