A jQuery plugin to make textarea be resized automatically to fit its contents.
Why I wrote this plugin
A precedent plugin on this feature is found here:
However, the plugin is not so good at multibyte character.
I, as a Japanese, thought it could be enhanced with using
.scrollHeight to detect textarea height.
IE6-8 has a bug on
.scrollHeightas described here:
This plugin copes well with this bug.
Padding height of a textarea is included in
.scrollHeighton IE, Webkit, Opera, but excluded on FireFox.
This plugin is perfectly cross-browser compatible.
- Win XP: IE8
- Win Vista: IE9, Opera, Firefox
- Mac OSX: Chrome, Firefox, Safari
- iOS: mobile safari