From: Michael M Slusarz Date: Tue, 3 Aug 2010 02:23:19 +0000 (-0600) Subject: Fix inifinte resize IE 8 bug in dimp compose screen X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fbd4028f910bcc081c8499cfb42ec0b6307ed4d6;p=horde.git Fix inifinte resize IE 8 bug in dimp compose screen --- 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()