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

Merge branch 'master' into t/ckeditor5-engine/1146

Piotrek Koszuliński 8 лет назад
Родитель
Сommit
fe4387210a

+ 5 - 2
packages/ckeditor5-undo/package.json

@@ -2,7 +2,10 @@
   "name": "@ckeditor/ckeditor5-undo",
   "version": "0.9.0",
   "description": "Undo manager for CKEditor 5.",
-  "keywords": [],
+  "keywords": [
+    "ckeditor5",
+    "ckeditor5-feature"
+  ],
   "dependencies": {
     "@ckeditor/ckeditor5-core": "^0.9.0",
     "@ckeditor/ckeditor5-engine": "^0.11.0",
@@ -18,7 +21,7 @@
     "@ckeditor/ckeditor5-paragraph": "^0.9.0",
     "@ckeditor/ckeditor5-typing": "^0.10.0",
     "@ckeditor/ckeditor5-utils": "^0.10.0",
-    "eslint-config-ckeditor5": "^1.0.5",
+    "eslint-config-ckeditor5": "^1.0.6",
     "gulp": "^3.9.1",
     "guppy-pre-commit": "^0.4.0"
   },

+ 23 - 0
packages/ckeditor5-undo/tests/undoengine-integration.js

@@ -870,6 +870,29 @@ describe( 'UndoEngine integration', () => {
 			editor.execute( 'undo' );
 			output( '<paragraph>Foo[]</paragraph><paragraph>Bar</paragraph>' );
 		} );
+
+		// https://github.com/ckeditor/ckeditor5-undo/issues/65#issuecomment-323682195
+		it( 'undoing split after the element created by split has been removed', () => {
+			input( '<paragraph>Foo[]bar</paragraph>' );
+
+			editor.execute( 'enter' );
+
+			doc.enqueueChanges( () => {
+				const range = new Range( new Position( root, [ 0, 3 ] ), new Position( root, [ 1, 3 ] ) );
+
+				doc.selection.setRanges( [ range ] );
+
+				editor.execute( 'delete' );
+			} );
+
+			editor.execute( 'undo' );
+
+			output( '<paragraph>Foo[</paragraph><paragraph>bar]</paragraph>' );
+
+			editor.execute( 'undo' );
+
+			output( '<paragraph>Foobar[]</paragraph>' );
+		} );
 	} );
 
 	describe( 'pasting', () => {