editor: fix resolving cursor destination after breaking content at the edge of text...
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 13 Dec 2013 13:02:55 +0000 (14:02 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Sun, 15 Dec 2013 21:32:51 +0000 (22:32 +0100)
src/editor/modules/documentCanvas/canvas/keyboard.js

index d2a8e44..0b876f0 100644 (file)
@@ -104,7 +104,7 @@ handlers.push({key: KEYS.ENTER,
                 var result = position.element.data('wlxmlNode').breakContent({offset: position.offset}),
                     goto, gotoOptions;
                 if(result.emptyText) {
                 var result = position.element.data('wlxmlNode').breakContent({offset: position.offset}),
                     goto, gotoOptions;
                 if(result.emptyText) {
-                    goto = result.createdEmpty;
+                    goto = result.emptyText;
                     gotoOptions = {};
                 } else {
                     goto = result.second;
                     gotoOptions = {};
                 } else {
                     goto = result.second;