X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/942d7dac932bdb6c659885aa97dd82f23ed00541..b6d075069ebe1dbcaecbb8097942d20f8fad5f16:/src/editor/modules/documentCanvas/canvas/keyboard.js?ds=inline diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js index dfe65d0..e7a3ba3 100644 --- a/src/editor/modules/documentCanvas/canvas/keyboard.js +++ b/src/editor/modules/documentCanvas/canvas/keyboard.js @@ -375,6 +375,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) {