code: function updateCollapsedAndCommonAncestor(range) {
              range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset);
              range.commonAncestorContainer = range.collapsed ?
                  range.startContainer : dom.getCommonAncestor(range.startContainer, range.endContainer);
          }
docs: /*---------------------------------------------------------------------------------------------------------------- Updates commonAncestorContainer and collapsed after boundary change