From: Aleksander Ɓukasz Date: Fri, 2 Aug 2013 10:03:28 +0000 (+0200) Subject: Bug fix: Removing item from DocumentNodeElement data caused removing all data X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/61a11b4e16b955a231391273e91ffc6ced32fa67 Bug fix: Removing item from DocumentNodeElement data caused removing all data - DocumentNodeElement.append was removing wrong attribute but due to bug in DocumentNodeElement.data it went undetected --- diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index c6c9f22..c38008b 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -154,7 +154,7 @@ $.extend(DocumentNodeElement.prototype, { var dom = this.dom(), args = Array.prototype.slice.call(arguments, 0); if(args.length === 2 && args[1] === undefined) - return dom.removeData(args[1]); + return dom.removeData(args[0]); return dom.data.apply(dom, arguments); }, toXML: function(level) { @@ -227,7 +227,7 @@ $.extend(DocumentNodeElement.prototype, { }, append: function(params) { if(params.tag !== 'span') - this.data('orig-ends', undefined); + this.data('orig-end', undefined); return manipulate(this, params, 'append'); }, before: function(params) {