8
0
فهرست منبع

Docs: clarified comment.

Szymon Cofalik 9 سال پیش
والد
کامیت
bd0cd9190e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      packages/ckeditor5-engine/src/model/operation/removeoperation.js

+ 3 - 1
packages/ckeditor5-engine/src/model/operation/removeoperation.js

@@ -122,7 +122,9 @@ export default class RemoveOperation extends MoveOperation {
 
 			graveyard.insertChildren( this._holderElementOffset, holderElement );
 
-			// Fix source position if we just inserted something before it.
+			// If the operation removes nodes that are already in graveyard, it may happen that
+			// the operation's source position is invalidated by inserting new holder element into the graveyard.
+			// If that's the case, we need to fix source position path.
 			if ( this.sourcePosition.root == graveyard && this.sourcePosition.path[ 0 ] >= this._holderElementOffset ) {
 				this.sourcePosition.path[ 0 ]++;
 			}