From 5e550b24c562a0fc35a734e99281a8f823ecbf15 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 22 Sep 2021 05:07:25 -0400 Subject: fixes for fontcolor dropdown to be continuous as pointer moves. --- src/client/views/nodes/formattedText/RichTextMenu.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx index 0a2a54aae..3efc46259 100644 --- a/src/client/views/nodes/formattedText/RichTextMenu.tsx +++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx @@ -336,8 +336,9 @@ export class RichTextMenu extends AntimodeMenu { setColor(color: String, view: EditorView, dispatch: any) { if (this.view) { const colorMark = view.state.schema.mark(view.state.schema.marks.pFontColor, { color }); - view.focus(); this.setMark(colorMark, this.view.state, (tx: any) => this.view!.dispatch(tx.addStoredMark(colorMark)), true); + view.focus(); + this.updateMenu(this.view, undefined, this.props); } } -- cgit v1.2.3-70-g09d2