浏览代码

Merge pull request #96 from ckeditor/t/ckeditor5/1385

Internal: Used `forceWeakRemove` flag in undo OT. See https://github.com/ckeditor/ckeditor5-engine/pull/1678.
Piotrek Koszuliński 6 年之前
父节点
当前提交
cd147be2d9
共有 2 个文件被更改,包括 2 次插入8 次删除
  1. 2 1
      packages/ckeditor5-undo/src/basecommand.js
  2. 0 7
      packages/ckeditor5-undo/tests/undocommand.js

+ 2 - 1
packages/ckeditor5-undo/src/basecommand.js

@@ -148,7 +148,8 @@ export default class BaseCommand extends Command {
 				{
 					useRelations: true,
 					document: this.editor.model.document,
-					padWithNoOps: false
+					padWithNoOps: false,
+					forceWeakRemove: true
 				}
 			);
 

+ 0 - 7
packages/ckeditor5-undo/tests/undocommand.js

@@ -266,13 +266,6 @@ describe( 'UndoCommand', () => {
 				for ( const item of model.createRangeIn( doc.graveyard ).getItems() ) {
 					expect( item.hasAttribute( 'key' ) ).to.be.false;
 				}
-
-				// Let's undo wrapping. This will remove the P element and leave us with empty root.
-				undo.execute( batch3 );
-				expect( root.maxOffset ).to.equal( 0 );
-
-				expect( editor.model.document.selection.getFirstRange().isEqual( r( 0, 0 ) ) ).to.be.true;
-				expect( editor.model.document.selection.isBackward ).to.be.false;
 			} );
 
 			it( 'should omit deltas with non-document operations', () => {