瀏覽代碼

Fixed: MoveOperation thrown errors when it should not (fixes #413).

Szymon Cofalik 9 年之前
父節點
當前提交
70b22962f4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/ckeditor5-engine/src/treemodel/operation/moveoperation.js

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/operation/moveoperation.js

@@ -139,7 +139,7 @@ export default class MoveOperation extends Operation {
 			throw new CKEditorError(
 				'operation-move-range-into-itself: Trying to move a range of nodes to the inside of that range.'
 			);
-		} else {
+		} else if ( this.sourcePosition.root == this.targetPosition.root ) {
 			if ( compareArrays( this.sourcePosition.getParentPath(), this.targetPosition.getParentPath() ) == 'PREFIX' ) {
 				let i = this.sourcePosition.path.length - 1;