Sfoglia il codice sorgente

Added comment with explanation. [skip ci]

Kamil Piechaczek 8 anni fa
parent
commit
20acc7aa2e
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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;
 		}