Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

Textarea height misbehaviour when max-height applied


Project:Auto Growing Textareas
Version:1.2.2
Component:Code
Category:bug report
Priority:normal
Assigned:dbz1982
Status:active
Description

There is a small issue when you pre-populate a textarea with content. If the height of the pre-populated field is more than the max-height, the textarea will revert to the original size of the textarea.

This problem can be overcome easily by editing the following section:

if (this.dummy.html() != html) {
this.dummy.html(html);
if (this.max_height > 0 && (this.dummy.height() + this.line_height > this.max_height)){
this.textarea.css('overflow-y', 'auto');
this.textarea.css('height', this.max_height);
//Added the above line to enfore the max height if content length more than max height.
} else {
this.textarea.css('overflow-y', 'hidden');
if (this.textarea.height() < this.dummy.height() + this.line_height || (this.dummy.height() < this.textarea.height())) {
this.textarea.animate({height: (this.dummy.height() + this.line_height) + 'px'}, 100);}
}
}

I noticed this in Firefox 3 on Ubuntu Linux OS. The issue and fix is still to be confirmed in other browsers.