From: Aleksander Ɓukasz Date: Tue, 16 Jul 2013 09:36:23 +0000 (+0200) Subject: Fix: publishing the right element as current text element on selecting node element X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/1845953de8ccc77c57f43a9d75affa17c36e44be Fix: publishing the right element as current text element on selecting node element --- diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 3f6599a..f80e961 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -216,7 +216,7 @@ $.extend(Canvas.prototype, { if(params.caretTo || !textElementToLand.sameNode(this.getCursor().getPosition().element)) this._moveCaretToTextElement(textElementToLand, params.caretTo); // as method on element? if(!(textElementToLand.sameNode(currentTextElement))) - this.publisher('currentTextElementSet', element); + this.publisher('currentTextElementSet', textElementToLand); } else { document.getSelection().removeAllRanges(); }