X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b8fd04203458b16750c8494f5a00851421d251ce..5f121e33df901aa33a79b2896e79759da6411948:/src/editor/modules/documentCanvas/commands.js?ds=inline diff --git a/src/editor/modules/documentCanvas/commands.js b/src/editor/modules/documentCanvas/commands.js index 076478b..85831d8 100644 --- a/src/editor/modules/documentCanvas/commands.js +++ b/src/editor/modules/documentCanvas/commands.js @@ -82,15 +82,9 @@ commands.register('list', function(canvas, params) { selectionStart = cursor.getSelectionStart(), selectionEnd = cursor.getSelectionEnd(), parent1 = selectionStart.element.parent() || undefined, - parent2 = selectionEnd.element.parent() || undefined; - - var selectionFocus = cursor.getSelectionFocus(); - - if(selectionStart.element.isInsideList() || selectionEnd.element.isInsideList()) { - return; - } - - var node1 = parent1.wlxmlNode, + parent2 = selectionEnd.element.parent() || undefined, + selectionFocus = cursor.getSelectionFocus(), + node1 = parent1.wlxmlNode, node2 = parent2.wlxmlNode, doc = node1.document; @@ -252,7 +246,6 @@ commands.register('newNodeRequested', function(canvas, params, user) { node.setAttr('href', event.formData.href); event.success(); }); - canvas.wlxmlDocument.endTransaction(); }); dialog.show(); return true;