X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b9558104eca9970ffba7f8e461e4878e70214114..da4ff24177c122a81ecae0e7693ffe2a3276ba1a:/src/editor/modules/documentCanvas/canvas/keyboard.js?ds=inline 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',