X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/d1363cb9ab794cf33c7d30cf15830857c8a9636c..25436cdfcd36e309bfdf99f858b66d15e3af3864:/modules/documentCanvas/canvas/canvas.js diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index bd45273..6f4e089 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -323,7 +323,7 @@ $.extend(Canvas.prototype, { getCurrentNodeElement: function() { - return this.getDocumentElement(this.wrapper.find('.current-node-element')[0]); + return this.getDocumentElement(this.wrapper.find('.current-node-element').parent()[0]); }, getCurrentTextElement: function() { @@ -351,7 +351,7 @@ $.extend(Canvas.prototype, { element.dom().addClass('current-text-element'); } else { this.wrapper.find('.current-node-element').removeClass('current-node-element') - element.dom().addClass('current-node-element'); + element._container().addClass('current-node-element'); this.publisher('currentElementChanged', element); } }.bind(this);