editor: canvas fix
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 21 Jul 2014 13:57:00 +0000 (15:57 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 24 Jul 2014 13:18:15 +0000 (15:18 +0200)
src/editor/modules/documentCanvas/canvas/canvas.js

index 29edbe5..d8090c8 100644 (file)
@@ -377,7 +377,7 @@ $.extend(Canvas.prototype, Backbone.Events, {
 
         if(textElementToLand) {
             _markAsCurrent(textElementToLand);
-            if(params.caretTo || !textElementToLand.sameNode(this.getCursor().getPosition().element)) {
+            if((params.caretTo || params.caretTo === 0) || !textElementToLand.sameNode(this.getCursor().getPosition().element)) {
                 this._moveCaretToTextElement(textElementToLand, params.caretTo); // as method on element?
             }
         } else {