8
0
Piotr Jasiun 8 жил өмнө
parent
commit
0bd55a6840

+ 1 - 1
packages/ckeditor5-engine/src/model/treewalker.js

@@ -153,7 +153,7 @@ export default class TreeWalker {
 	}
 
 	/**
-	 * Move {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.
+	 * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.
 	 *
 	 * For example:
 	 *

+ 1 - 0
packages/ckeditor5-engine/src/view/range.js

@@ -131,6 +131,7 @@ export default class Range {
 		let nodeAfterStart = start.nodeAfter;
 		let nodeBeforeEnd = end.nodeBefore;
 
+		// Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.
 		if ( nodeAfterStart instanceof Text ) {
 			start = new Position( nodeAfterStart, 0 );
 		}

+ 1 - 1
packages/ckeditor5-engine/src/view/treewalker.js

@@ -141,7 +141,7 @@ export default class TreeWalker {
 	}
 
 	/**
-	 * Move {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.
+	 * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.
 	 *
 	 * For example:
 	 *