Skip to content

Commit

Permalink
updateOriginalInput is being called on every item change and it now u…
Browse files Browse the repository at this point in the history
…pdates the attribute for type DOM elements
  • Loading branch information
Scottmitch committed May 22, 2014
1 parent 6caddcc commit a7f10f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ $.extend(Selectize.prototype, {
updateOriginalInput: function() {
var i, n, options, self = this;

if (self.$input[0].tagName.toLowerCase() === 'select') {
if (self.tagType === TAG_SELECT) {
options = [];
for (i = 0, n = self.items.length; i < n; i++) {
options.push('<option value="' + escape_html(self.items[i]) + '" selected="selected"></option>');
Expand All @@ -1497,6 +1497,7 @@ $.extend(Selectize.prototype, {
self.$input.html(options.join(''));
} else {
self.$input.val(self.getValue());
self.$input.attr('value',self.$input.val());
}

if (self.isSetup) {
Expand Down

0 comments on commit a7f10f9

Please sign in to comment.