doc = node1.document;
if(doc.areItemsOfSameList({node1: node1, node2: node2})) {
doc.extractItems({item1: node1, item2: node2});
canvas.setCurrentElement(selectionAnchor.element, {caretTo: selectionAnchor.offset});
} else if(!cursor.isSelecting()) {
doc = node1.document;
if(doc.areItemsOfSameList({node1: node1, node2: node2})) {
doc.extractItems({item1: node1, item2: node2});
canvas.setCurrentElement(selectionAnchor.element, {caretTo: selectionAnchor.offset});
} else if(!cursor.isSelecting()) {