From d5dade387d7f6885880f3a5ca8229252be8f0234 Mon Sep 17 00:00:00 2001
From: Jan Szejko <janek37@gmail.com>
Date: Wed, 22 Feb 2017 13:58:14 +0100
Subject: [PATCH] remove empty list

---
 src/editor/modules/documentCanvas/canvas/keyboard.js | 3 +++
 1 file changed, 3 insertions(+)

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) {
-- 
2.20.1