From: Jan Szejko Date: Wed, 22 Feb 2017 12:58:14 +0000 (+0100) Subject: remove empty list X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/9abc2f052e1503f396f118e9508b14cb8b276e39 remove empty list (cherry picked from commit d5dade3) --- 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) {