-
Notifications
You must be signed in to change notification settings - Fork 4
Do not register batches which have only non-document operations #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing integration test.
@@ -65,6 +65,13 @@ export default class UndoEngine extends Plugin { | |||
|
|||
this.listenTo( this.editor.model, 'applyOperation', ( evt, args ) => { | |||
const operation = args[ 0 ]; | |||
|
|||
// Do not register batch if the operation is not a document operation. | |||
// This prevents from creating empty undo steps, where all operations where non-document operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the bug is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you consider this completely obvious that undo should not record these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I consider everything obvious :). I'll add one more line of comment to make it more obvious.
But I confirm that the fix work. |
I've completed requested changes. |
Suggested merge commit message (convention)
Fix: Do not register batches which have only non-document operations. Closes ckeditor/ckeditor5#2719. Closes ckeditor/ckeditor5#781.