remove empty list
authorJan Szejko <janek37@gmail.com>
Wed, 22 Feb 2017 12:58:14 +0000 (13:58 +0100)
committerJan Szejko <janek37@gmail.com>
Wed, 22 Feb 2017 12:58:14 +0000 (13:58 +0100)
src/editor/modules/documentCanvas/canvas/keyboard.js

index 19f77b9..bc9e276 100644 (file)
@@ -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) {