- element1 = element1.parent();
- element2 = element2.parent();
- if(this.canvas.list.areItemsOfTheSameList({element1: element1, element2: element2})) {
- this.canvas.list.extractItems({element1: element1, element2: element2});
+ if(this.canvas.list.areItemsOfTheSameList({element1: parent1, element2: parent2})) {
+ this.canvas.list.extractItems({element1: parent1, element2: parent2});
+ } else if (!selection.collapsed) {
+ element1.unwrap();