The idea behind this example is to automatically fit a textarea tag to the available scrollHeight, so there is no need for a vertical scrollbar, while still allowing the horizontal scrollbar to show if there are words longer than the available width.
This problem seems to manifest itself in Internet Explorer versions 6 through 8 (As of this article v8.0.6001.18702). IE 5.5 handles this correctly.
A red textarea below indicates that the test failed. (Clicking the button twice with fix it as well)
This orange DIV tag is 180px wide, and 440px high.
The textarea tag below sets it's height to scrollHeight directly: "textarea.style.height = textarea.scrollHeight + 'px';"