aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-10-08 22:40:39 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-10-08 22:40:39 +0530
commit7ae3e17011725b380b9010e7579c7084139b61e5 (patch)
tree5da5d396deea2d9c0e6b1d20036133a3897a336a /src/client/views/nodes
parent4508b7feacd4ac1ea8145d3284527b523829606a (diff)
parentf6623a790fbb5df02effebbe9edea69383e0569f (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx1
-rw-r--r--src/client/views/nodes/formattedText/RichTextMenu.tsx4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index c6bd0cb81..a5bcf988a 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -1450,6 +1450,7 @@ 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);
FormattedTextBox.HadSelection = window.getSelection()?.toString() !== "";
this.endUndoTypingBatch();
this.doLinkOnDeselect();
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx
index d492b561b..2700c508b 100644
--- a/src/client/views/nodes/formattedText/RichTextMenu.tsx
+++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx
@@ -153,11 +153,11 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
public delayHide = () => this._delayHide = true;
@action
- public updateMenu(view: EditorView, lastState: EditorState | undefined, props: any) {
+ public updateMenu(view: EditorView | undefined, lastState: EditorState | undefined, props: any) {
+ this.view = view;
if (!view || !view.hasFocus()) {
return;
}
- this.view = view;
props && (this.editorProps = props);
// Don't do anything if the document/selection didn't change