8
0
Просмотр исходного кода

WiP: Test using transparent batch in undo commands.

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
8f0e38c47f

+ 1 - 1
packages/ckeditor5-undo/src/redocommand.js

@@ -30,7 +30,7 @@ export default class RedoCommand extends BaseCommand {
 	 */
 	execute() {
 		const item = this._stack.pop();
-		const redoingBatch = this.editor.model.createBatch();
+		const redoingBatch = this.editor.model.createBatch( 'transparent' );
 
 		// All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive
 		// operations, or won't do changes to the document before selection is properly restored.

+ 1 - 1
packages/ckeditor5-undo/src/undocommand.js

@@ -33,7 +33,7 @@ export default class UndoCommand extends BaseCommand {
 		const batchIndex = batch ? this._stack.findIndex( a => a.batch == batch ) : this._stack.length - 1;
 
 		const item = this._stack.splice( batchIndex, 1 )[ 0 ];
-		const undoingBatch = this.editor.model.createBatch();
+		const undoingBatch = this.editor.model.createBatch( 'transparent' );
 
 		// All changes has to be done in one `enqueueChange` callback so other listeners will not
 		// step between consecutive operations, or won't do changes to the document before selection is properly restored.