X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/50cc0c32bb9b2322e3f25be4803ad1adbf1d92a6..f17e9178a91a7df96fd252f66e058e880eac8932:/modules/documentCanvas/canvas/canvas.js 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(); }