- doc.createList({node1: node1, node2: node2});
- canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset});
+ doc.transaction(function() {
+ doc.createList({node1: node1, node2: node2});
+ }, {
+ success: function() {
+ canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset});
+ }
+ });