From: Michael M Slusarz Date: Tue, 23 Feb 2010 00:53:08 +0000 (-0700) Subject: Fix compose window resizing. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ceca14172dc0adb8e00e6bf98206dc147dde7842;p=horde.git Fix compose window resizing. --- diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index ae2bf59d2..13a18c63e 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -649,15 +649,15 @@ var DimpCompose = { }); this.rte.resize('100%', mah - pad, false); - } - - /* Logic: Determine the size of a given textarea row, divide that size - * by the available height, round down to the lowest integer row, and - * resize the textarea. */ - rows = parseInt(mah / (msg.clientHeight / msg.getAttribute('rows')), 10); - msg.writeAttribute({ rows: rows, disabled: false }); - if (de.scrollHeight - de.clientHeight) { - msg.writeAttribute('rows', rows - 1); + } else { + /* Logic: Determine the size of a given textarea row, divide that + * size by the available height, round down to the lowest integer + * row, and resize the textarea. */ + rows = parseInt(mah / (msg.clientHeight / msg.getAttribute('rows')), 10); + msg.writeAttribute({ rows: rows, disabled: false }); + if (de.scrollHeight - de.clientHeight) { + msg.writeAttribute('rows', rows - 1); + } } },