if(this.startContainer !== this.endContainer){ if(!__internal_common){ var r = (this._body||this.startContainer.ownerDocument.body).createTextRange(); this._simpleSetEndPoint(this.startContainer,r); this._simpleSetEndPoint(this.endContainer,r,true); __internal_common = r.parentElement(); } this.commonAncestorContainer = dijit.range.getCommonAncestor(this.startContainer, this.endContainer, __internal_common); }else{ this.commonAncestorContainer = this.startContainer; } this.collapsed = (this.startContainer === this.endContainer) && (this.startOffset == this.endOffset);