From 9d9602e45d33061725dce4d271250a76b6a96f13 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 23 Dec 2009 12:35:29 -0700 Subject: [PATCH] Clearer if we just do init within onload function --- imp/js/compose-dimp.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index 3cef8332b..a82b784d6 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -425,16 +425,6 @@ var DimpCompose = { return document.viewport.getHeight() - $('composeMessageParent').cumulativeOffset()[1] - this.mp_padding; }, - initializeSpellChecker: function() - { - document.observe('SpellChecker:noerror', this._onSpellCheckNoError.bind(this)); - - if (DIMP.conf_compose.rte_avail) { - document.observe('SpellChecker:after', this._onSpellCheckAfter.bind(this)); - document.observe('SpellChecker:before', this._onSpellCheckBefore.bind(this)); - } - }, - _onSpellCheckAfter: function() { if (this.editor_on) { @@ -817,7 +807,13 @@ var DimpCompose = { $('submit_frame').observe('load', this.attachmentComplete.bind(this)); this.resizeMsgArea(); - this.initializeSpellChecker(); + + // Initialize spell checker + document.observe('SpellChecker:noerror', this._onSpellCheckNoError.bind(this)); + if (DIMP.conf_compose.rte_avail) { + document.observe('SpellChecker:after', this._onSpellCheckAfter.bind(this)); + document.observe('SpellChecker:before', this._onSpellCheckBefore.bind(this)); + } // Automatically resize address fields. this.resizeto = new ResizeTextArea('to', boundResize); -- 2.11.0