diff options
author | bobzel <zzzman@gmail.com> | 2020-08-18 16:15:42 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-18 16:15:42 -0400 |
commit | f02d2ca93534141570a5dc01fda8165d1e6d22d5 (patch) | |
tree | 0308f4b7317ef57ebfde06c1595eadeb81485883 /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 31502adf80879d21455768890ceafec7fa139534 (diff) |
fixed undoing typed text boxes to happen in one step (not undo to first character, then undo again fo whole box)
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 669289904..0f2f90c1d 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1434,6 +1434,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } return wasUndoing; } + public static LiveTextUndo: UndoManager.Batch | undefined; public static HadSelection: boolean = false; onBlur = (e: any) => { FormattedTextBox.HadSelection = window.getSelection()?.toString() !== ""; @@ -1441,6 +1442,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp this.endUndoTypingBatch(); this.doLinkOnDeselect(); + FormattedTextBox.LiveTextUndo?.end(); + FormattedTextBox.LiveTextUndo = undefined; // move the richtextmenu offscreen //if (!RichTextMenu.Instance.Pinned) RichTextMenu.Instance.delayHide(); } |