From 50f1986c862470e80f014fe70981e4d472137ada Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Thu, 17 Jul 2014 13:31:27 +0200 Subject: [PATCH] Add option text to original select input --- src/selectize.js | 2 +- test/interaction.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/selectize.js b/src/selectize.js index d5b654275..fa26fe192 100644 --- a/src/selectize.js +++ b/src/selectize.js @@ -1518,7 +1518,7 @@ $.extend(Selectize.prototype, { if (self.tagType === TAG_SELECT) { options = []; for (i = 0, n = self.items.length; i < n; i++) { - options.push(''); + options.push(''); } if (!options.length && !this.$input.attr('multiple')) { options.push(''); diff --git a/test/interaction.js b/test/interaction.js index 9d08fc1fd..7e4fd154b 100644 --- a/test/interaction.js +++ b/test/interaction.js @@ -55,6 +55,7 @@ .click($('[data-value="b"]', test.selectize.$dropdown)) .delay(0, function() { expect(test.selectize.$input.val()).to.be.equal('b'); + expect(test.selectize.$input.text()).to.be.equal('B'); done(); }); }); @@ -241,4 +242,4 @@ }); -})(); \ No newline at end of file +})();