Skip to content

Commit

Permalink
Merge pull request selectize#432 from Scottmitch1/issue_427
Browse files Browse the repository at this point in the history
updateOriginalInput updates value attribute for input type DOM elements
  • Loading branch information
brianreavis committed Jun 1, 2014
2 parents 59d1f63 + a7f10f9 commit 28d56e9
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 @@ -1491,7 +1491,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 @@ -1502,6 +1502,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 28d56e9

Please sign in to comment.