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
12 changes: 11 additions & 1 deletion jquery.jeditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
* @param String options[select] true or false, when true text is highlighted ??
* @param String options[placeholder] Placeholder text or html to insert when element is empty. **
* @param String options[onblur] 'cancel', 'submit', 'ignore' or function ??
*
* @param String options[size] the size of the text field
* @param String options[maxlength] the maximum number of character in the text field
*
* @param Function options[onsubmit] function(settings, original) { ... } called before submit
* @param Function options[onreset] function(settings, original) { ... } called before reset
* @param Function options[onerror] function(settings, original, xhr) { ... } called on error
Expand Down Expand Up @@ -457,6 +459,14 @@
/* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
//input[0].setAttribute('autocomplete','off');
input.attr('autocomplete','off');
if (settings.size) {
input.attr('size', settings.size);
}

if (settings.maxlength) {
input.attr('maxlength', settings.maxlength);
}

$(this).append(input);
return(input);
}
Expand Down