diff options
author | bobzel <zzzman@gmail.com> | 2021-09-13 17:01:54 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-13 17:01:54 -0400 |
commit | bab473b8c5916404c49f46a639bc660aa7ee2130 (patch) | |
tree | 27d8f7fcc7dc98b41ce0770b6e2c2f070fe99a39 /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 8c5fd1eb3c1ffb5bc17f5225a75f9dd2db40e460 (diff) |
fixed clicking on link drag button to create doc in sidebar for RTF documents.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index fce95547e..b1d4a79db 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -214,6 +214,11 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp @action setupAnchorMenu = () => { AnchorMenu.Instance.Status = "marquee"; + + AnchorMenu.Instance.OnClick = (e: PointerEvent) => { + !this._showSidebar && this.toggleSidebar(); + this._sidebarRef.current?.anchorMenuClick(this.getAnchor()); + }; AnchorMenu.Instance.Highlight = action((color: string, isLinkButton: boolean) => { this._editorView?.state && RichTextMenu.Instance.setHighlight(color, this._editorView, this._editorView?.dispatch); return undefined; |