diff --git a/select2.js b/select2.js index 336dfa0b..94a5e5da 100644 --- a/select2.js +++ b/select2.js @@ -724,6 +724,10 @@ the specific language governing permissions and limitations under the Apache Lic this.monitorSource(); } + if (opts.maximumInputLength !== null) { + this.search.attr("maxlength", opts.maximumInputLength); + } + var disabled = opts.element.prop("disabled"); if (disabled === undefined) disabled = false; this.enable(!disabled);