- if(canvas.list.areItemsOfTheSameList({element1: parent1, element2: parent2})) {
- return;
- // TODO
- // var selectionAnchor = cursor.getSelectionAnchor();
- // canvas.list.extractItems({element1: parent1, element2: parent2});
- // canvas.setCurrentElement(selectionAnchor.element, {caretTo: selectionAnchor.offset});
+ var selectionAnchor = cursor.getSelectionAnchor(),
+ node1 = parent1.data('wlxmlNode'),
+ node2 = parent2.data('wlxmlNode'),
+ doc = node1.document;
+ if(doc.areItemsOfSameList({node1: node1, node2: node2})) {
+
+
+ doc.extractItems({item1: node1, item2: node2});
+
+ //canvas.list.extractItems({element1: parent1, element2: parent2});
+ canvas.setCurrentElement(selectionAnchor.element, {caretTo: selectionAnchor.offset});