X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1576b7c8102f5e5a5cd40512b5d22565e8f871d2..b65f1bbd3863db4164c3b7283e187460ccdf2504:/modules/documentCanvas/commands.js?ds=inline 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) {