From 84a0c8eeefe4f8ea5da616a0527f1f958cad893c Mon Sep 17 00:00:00 2001
From: =?utf8?q?Aleksander=20=C5=81ukasz?=
 <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Thu, 26 Jun 2014 14:33:41 +0200
Subject: [PATCH] editor: canvas fix

---
 src/editor/modules/documentCanvas/canvas/keyboard.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js
index b739cf8..71a50b0 100644
--- a/src/editor/modules/documentCanvas/canvas/keyboard.js
+++ b/src/editor/modules/documentCanvas/canvas/keyboard.js
@@ -48,7 +48,7 @@ handlers.push({key: KEYS.ENTER,
 
         if(Object.keys(cursor.getPosition()).length === 0) {
             var currentElement = canvas.getCurrentNodeElement();
-            if(currentElement) {
+            if(currentElement && !currentElement.wlxmlNode.isRoot()) {
                 canvas.wlxmlDocument.transaction(function() {
                     var added = currentElement.wlxmlNode.after({
                         tagName: currentElement.wlxmlNode.getTagName() || 'div',
-- 
2.20.1