+ if(anchorNode.hasSameContextRoot(focusNode)) {
+ var siblingParents = doc.getSiblingParents({node1: anchorNode, node2: focusNode});
+ node1 = siblingParents.node1;
+ node2 = siblingParents.node2;
+ } else {
+ node1 = focusNode;
+ node2 = anchorNode;
+ }