Creating a textarea with auto-resize
问题 There was another thread about this, which I\'ve tried. But there is one problem: the textarea doesn\'t shrink if you delete the content. I can\'t find any way to shrink it to the correct size - the clientHeight value comes back as the full size of the textarea , not its contents. The code from that page is below: function FitToContent(id, maxHeight) { var text = id && id.style ? id : document.getElementById(id); if ( !text ) return; var adjustedHeight = text.clientHeight; if ( !maxHeight ||