From 50e51515ed4e591b285b67978f61948bcf614dcb Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 18 Feb 2010 23:36:47 -0700 Subject: [PATCH] Fix setting class attribute on spellcheck results DIV --- horde/js/SpellChecker.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/horde/js/SpellChecker.js b/horde/js/SpellChecker.js index c89de2be7..7d2442f26 100644 --- a/horde/js/SpellChecker.js +++ b/horde/js/SpellChecker.js @@ -105,7 +105,7 @@ var SpellChecker = Class.create({ onComplete: function(request) { - var bad, content, d, + var bad, content, i = 0, result = request.responseJSON; @@ -140,14 +140,13 @@ var SpellChecker = Class.create({ }, this); if (!this.reviewDiv) { - this.reviewDiv = new Element('div', { className: this.target.readAttribute('className') }).addClassName('spellcheck').setStyle({ overflow: 'auto' }); + this.reviewDiv = new Element('DIV', { className: this.target.readAttribute('class') }).addClassName('spellcheck').setStyle({ overflow: 'auto' }); if (this.resumeOnDblClick) { this.reviewDiv.observe('dblclick', this.resume.bind(this)); } } - d = this.target.getDimensions(); - this.reviewDiv.setStyle({ width: d.width + 'px', height: d.height + 'px'}); + this.reviewDiv.setStyle({ width: this.target.clientWidth + 'px', height: this.target.clientHeight + 'px'}); if (!this.htmlAreaParent) { content = content.replace(/~~~/g, '
'); -- 2.11.0