Explorar o código

Removed an if condition which is not necessary. Selection is being fixed after applying operation so it is always correct.

Kamil Piechaczek %!s(int64=7) %!d(string=hai) anos
pai
achega
ee8466a8bd
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      packages/ckeditor5-engine/src/model/documentselection.js

+ 1 - 4
packages/ckeditor5-engine/src/model/documentselection.js

@@ -512,10 +512,7 @@ class LiveSelection extends Selection {
 			while ( this._fixGraveyardRangesData.length ) {
 				const { liveRange, sourcePosition } = this._fixGraveyardRangesData.shift();
 
-				// Checks whether the `liveRange` is still inside the graveyard.
-				if ( liveRange.root == this._document.graveyard ) {
-					this._fixGraveyardSelection( liveRange, sourcePosition );
-				}
+				this._fixGraveyardSelection( liveRange, sourcePosition );
 			}
 
 			if ( this._hasChangedRange ) {