Last Updated: February 25, 2016
·
964
· midu

Automatically resize textareas as content grows

Quick and easy:

$('textarea').on 'scroll', ->
  if @scrollHeight > @clientHeight
    @style.height = @scrollHeight + "px";

demo

Compatibilty

All the way down to IE6 if you use jQuery or similar for the "scroll" event, IE9+ otherwise.

Sources: