X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1576b7c8102f5e5a5cd40512b5d22565e8f871d2..61143e615dfb903cd11c11539b7259cc4bc8b9fe:/modules/documentCanvas/commands.js?ds=sidebyside diff --git a/modules/documentCanvas/commands.js b/modules/documentCanvas/commands.js index 96b7c70..0e48de1 100644 --- a/modules/documentCanvas/commands.js +++ b/modules/documentCanvas/commands.js @@ -55,6 +55,7 @@ commands.register('toggle-list', function(canvas, params) { parent1 = selectionStart.element.parent() || undefined, parent2 = selectionEnd.element.parent() || undefined; + var selectionFocus = cursor.getSelectionFocus(); if(params.toggle) { canvas.list.create({element1: parent1, element2: parent2}); } else { @@ -62,6 +63,7 @@ commands.register('toggle-list', function(canvas, params) { canvas.list.extractItems({element1: parent1, element2: parent2, merge: false}); } } + canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset}); }); commands.register('toggle-grid', function(canvas, params) {