This patch combines the solution submitted by Ray Guo (computed min-height) and the one used in AMOS (set the height of the textarea so that it takes all available space in the row).