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/d5dade387d7f6885880f3a5ca8229252be8f0234?ds=sidebyside remove empty list --- diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js index 19f77b9..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) {