浏览代码

Added comment with explanation. [skip ci]

Kamil Piechaczek 8 年之前
父节点
当前提交
20acc7aa2e
共有 1 个文件被更改,包括 1 次插入0 次删除
  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 ) );
 		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' ) ) {
 		if ( node.is( 'text' ) ) {
 			return node.parent;
 			return node.parent;
 		}
 		}