From: Aleksander Ɓukasz Date: Mon, 21 Jul 2014 13:57:00 +0000 (+0200) Subject: editor: canvas fix X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/a892115bc1f94bfd53873dd442854b5ebe3fd03c?ds=inline;hp=bb2386536d121225c04a5862833d832aa271e52b editor: canvas fix --- diff --git a/src/editor/modules/documentCanvas/canvas/canvas.js b/src/editor/modules/documentCanvas/canvas/canvas.js index 29edbe5..d8090c8 100644 --- a/src/editor/modules/documentCanvas/canvas/canvas.js +++ b/src/editor/modules/documentCanvas/canvas/canvas.js @@ -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 {