소스 검색

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;