From 76c039d86e279bf76e06f6a17a1e528d7adfbc59 Mon Sep 17 00:00:00 2001 From: vitalif Date: Sat, 6 Oct 2012 21:46:38 +0000 Subject: [PATCH] Fix minor bugs --- nicEdit.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nicEdit.js b/nicEdit.js index cf8a9e8..3807567 100644 --- a/nicEdit.js +++ b/nicEdit.js @@ -1663,7 +1663,7 @@ var nicTableButton = nicEditorAdvancedButton.extend({ this.t = this.findElm('TABLE','title',tmp); } if(this.t) { - this.t.remoteAttribute('title'); + this.t.removeAttribute('title'); for (i = r; i < this.t.rows.length; i++) { this.t.deleteRow(r); } @@ -1718,7 +1718,7 @@ nicEditor = nicEditor.extend({ var e = this.selectedInstance; if (!e || !(e = e.e)) return; var h = this.floating.offsetHeight; - this.oldMargin = e.style.marginTop; + if (this.oldMargin === undefined) this.oldMargin = e.style.marginTop||''; e.style.marginTop = h+'px'; var top = e.offsetTop-h; var d = document; @@ -1731,6 +1731,7 @@ nicEditor = nicEditor.extend({ hide: function() { this.floating.setStyle({ top: '-1000px' }); - this.selectedInstance.e.style.marginTop = this.oldMargin; + if (this.selectedInstance) this.selectedInstance.e.style.marginTop = this.oldMargin; + this.oldMargin = null; } });