diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-01 12:23:54 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-01 12:23:54 -0400 |
| commit | 9f204c5dfbd2570f40f0d60e5e50815f8376a8c2 (patch) | |
| tree | 1d682f0a3f34c8924e796384d6e1fab64bca7e6c /src/client/views/nodes/formattedText/RichTextMenu.tsx | |
| parent | 2e001d89e2490f278764135f02d9191b5d704dbd (diff) | |
| parent | e1d26d7d98962572f020e55c88e6c9e63a7dfa8a (diff) | |
Merge branch 'master' into eleanor-gptdraw
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextMenu.tsx')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextMenu.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx index 738f6d699..1560d51a1 100644 --- a/src/client/views/nodes/formattedText/RichTextMenu.tsx +++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx @@ -1,6 +1,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Tooltip } from '@mui/material'; -import { action, computed, IReactionDisposer, makeObservable, observable } from 'mobx'; +import { action, computed, IReactionDisposer, makeObservable, observable, runInAction } from 'mobx'; import { observer } from 'mobx-react'; import { lift, toggleMark, wrapIn } from 'prosemirror-commands'; import { Mark, MarkType } from 'prosemirror-model'; @@ -68,10 +68,12 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> { constructor(props: AntimodeMenuProps) { super(props); makeObservable(this); - RichTextMenu._instance.menu = this; - this.updateMenu(undefined, undefined, props, this.layoutDoc); - this._canFade = false; - this.Pinned = true; + runInAction(() => { + RichTextMenu._instance.menu = this; + this.updateMenu(undefined, undefined, props, this.layoutDoc); + this._canFade = false; + this.Pinned = true; + }); } @computed get noAutoLink() { |
