From ceca14172dc0adb8e00e6bf98206dc147dde7842 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 22 Feb 2010 17:53:08 -0700 Subject: [PATCH] Fix compose window resizing. --- imp/js/compose-dimp.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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); + } } }, -- 2.11.0