diff options
| author | bobzel <zzzman@gmail.com> | 2023-02-01 02:22:00 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-02-01 02:22:00 -0500 |
| commit | 294412015c0f3dbfaa8982f1dcab100fbfdd036f (patch) | |
| tree | 6df55e2d2df6dfdfbb9656c5f49aa72325950fe6 /src/client/views/nodes/formattedText | |
| parent | 5e2f64f3ee172e37d0d3277637a7778b640a2066 (diff) | |
fixed ungrouping documents on video/image/etc. fixed undoing deleting collections to reset annotationOn field. fixed setting size in text box with richtext menu buttons and not losing focus and having stored marks get lost.
Diffstat (limited to 'src/client/views/nodes/formattedText')
| -rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 80832c9be..619c59f0e 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1612,7 +1612,15 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps onBlur = (e: any) => { if (this.ProseRef?.children[0] !== e.nativeEvent.target) return; if (!(this.EditorView?.state.selection instanceof NodeSelection) || this.EditorView.state.selection.node.type !== this.EditorView.state.schema.nodes.footnote) { + const stordMarks = this._editorView?.state.storedMarks?.slice(); this.autoLink(); + if (this._editorView?.state.tr) { + const tr = stordMarks?.reduce((tr, m) => { + tr.addStoredMark(m); + return tr; + }, this._editorView.state.tr); + tr && this._editorView.dispatch(tr); + } } FormattedTextBox.Focused === this && (FormattedTextBox.Focused = undefined); if (RichTextMenu.Instance?.view === this._editorView && !this.props.isSelected(true)) { |
