diff --git a/src/selectize.js b/src/selectize.js index 64b8f8670..fb05f7dcc 100644 --- a/src/selectize.js +++ b/src/selectize.js @@ -180,7 +180,9 @@ $.extend(Selectize.prototype, { if ($input.attr('autocapitalize')) { $control_input.attr('autocapitalize', $input.attr('autocapitalize')); } - $control_input[0].type = $input[0].type; + if ($input.is('input')) { + $control_input[0].type = $input[0].type; + } self.$wrapper = $wrapper; self.$control = $control; @@ -815,6 +817,11 @@ $.extend(Selectize.prototype, { * @param {mixed} value */ setValue: function(value, silent) { + const items = Array.isArray(value) ? value : [value]; + if (items.join('') === this.items.join('')) { + return; + } + var events = silent ? [] : ['change']; debounce_events(this, events, function() {