From fbd4028f910bcc081c8499cfb42ec0b6307ed4d6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 2 Aug 2010 20:23:19 -0600 Subject: [PATCH] Fix inifinte resize IE 8 bug in dimp compose screen --- imp/js/compose-dimp.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index f8e5173c7..f5be1f2d4 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -10,8 +10,8 @@ var DimpCompose = { // Variables defaulting to empty/false: // auto_save_interval, compose_cursor, disabled, drafts_mbox, - // editor_wait, is_popup, knl, last_msg, loaded, old_action, - // old_identity, rte, skip_spellcheck, spellcheck, sc_submit, uploading + // editor_wait, is_popup, knl, last_msg, old_action, old_identity, + // resizing, rte, skip_spellcheck, spellcheck, sc_submit, uploading knl: {}, @@ -684,11 +684,19 @@ var DimpCompose = { msg = $('composeMessage'), pad = 0; + if (this.resizing) { + return; + } + if (!document.loaded) { this.resizeMsgArea.bind(this).defer(); return; } + /* Needed because IE 8 will trigger resize events when we change + * the rows attribute, which will cause an infinite loop. */ + this.resizing = true; + mah = document.viewport.getHeight() - cmp.offsetTop; if (IMP_Compose_Base.editor_on) { @@ -718,6 +726,8 @@ var DimpCompose = { } while ((de.scrollHeight - de.clientHeight) > 0); } } + + this.resizing = false; }, uploadAttachment: function() -- 2.11.0