Kamil Piechaczek преди 7 години
родител
ревизия
a5f33428bc
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      packages/ckeditor5-engine/src/model/utils/modifyselection.js

+ 1 - 1
packages/ckeditor5-engine/src/model/utils/modifyselection.js

@@ -172,7 +172,7 @@ function getCorrectWordBreakPosition( walker, isForward ) {
 			// should expand to : 'foofoo [bar<$text bold="true">bar</$text>] bazbaz'.
 			const nextNode = isForward ? walker.position.nodeAfter : walker.position.nodeBefore;
 
-			// `nextNode` can be an inline element which is an invalid node in this case.
+			// Scan only text nodes. Ignore inline elements (like `<softBreak>`).
 			if ( nextNode && nextNode.is( 'text' ) ) {
 				// Check boundary char of an adjacent text node.
 				const boundaryChar = nextNode.data.charAt( isForward ? 0 : nextNode.data.length - 1 );