Forráskód Böngészése

Revert "Code style changes in selection-post-fixer."

This reverts commit d1a522fd
Maciej Gołaszewski 7 éve
szülő
commit
34995fa46f

+ 1 - 1
packages/ckeditor5-engine/src/model/utils/selection-post-fixer.js

@@ -190,7 +190,7 @@ function tryFixingNonCollapsedRage( range, schema ) {
 			const fixedStart = isStartObject ? start : schema.getNearestSelectionRange( start, 'forward' ).start;
 
 			const isEndObject = end.nodeBefore && schema.isObject( end.nodeBefore );
-			const fixedEnd = isEndObject ? end : schema.getNearestSelectionRange( end, 'backward' ).end;
+			const fixedEnd = isEndObject ? null : schema.getNearestSelectionRange( end, 'backward' );
 
 			return new Range( fixedStart ? fixedStart.start : start, fixedEnd ? fixedEnd.start : end );
 		}