Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions js/jquery.jeditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* @param String options[id] POST parameter name of edited div id
* @param Hash options[submitdata] Extra parameters to send when submitting edited content.
* @param String options[type] text, textarea or select
* @param Integer options[maxlength] maxlength value for text input or textarea
* @param Integer options[rows] number of rows if using textarea
* @param Integer options[cols] number of columns if using textarea
* @param Mixed options[height] 'auto', 'none' or height in pixels
Expand Down Expand Up @@ -338,6 +339,9 @@ jQuery.editable = {
/* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
//input[0].setAttribute('autocomplete','off');
input.attr('autocomplete','off');
if (settings.maxlength) {
input.attr('maxlength', settings.maxlength);
}
jQuery(this).append(input);
return(input);
}
Expand All @@ -355,6 +359,9 @@ jQuery.editable = {
} else {
textarea.width(settings.width);
}
if (settings.maxlength) {
textarea.attr('maxlength', settings.maxlength);
}
jQuery(this).append(textarea);
return(textarea);
}
Expand Down