Browse Source

Added comment with explanation. [skip ci]

Kamil Piechaczek 8 years ago
parent
commit
20acc7aa2e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/ckeditor5-engine/src/model/position.js

+ 1 - 0
packages/ckeditor5-engine/src/model/position.js

@@ -332,6 +332,7 @@ export default class Position {
 
 		const node = this.root.getNodeByPath( this.getCommonPath( position ) );
 
+		// Although paths can indicate a text node, text node is not an ancestor of a position.
 		if ( node.is( 'text' ) ) {
 			return node.parent;
 		}