X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/8f44492501cad481f4d4ddcd58f7e9b26e2a7721..fd61d32:/src/editor/modules/documentCanvas/canvas/keyboard.js?ds=sidebyside diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js index 48fa0f9..bc9e276 100644 --- a/src/editor/modules/documentCanvas/canvas/keyboard.js +++ b/src/editor/modules/documentCanvas/canvas/keyboard.js @@ -371,6 +371,9 @@ var keyEventHandlers = [ var p = list.after({tagName: 'div', attrs: {'class': 'p'}}); p.append({text: ''}); item.detach(); + if(list.contents().length === 0) { + list.detach(); + } return p; }, { success: function(p) { @@ -428,7 +431,7 @@ var keyEventHandlers = [ result = s.element.wlxmlNode.insertNewNode(); }, { metadata: { - description: gettext('Splitting node'), + description: gettext('Inserting node'), fragment: s.toDocumentFragment() } });