From c4c1cbabdefe1124d95b2207323659cb416f94ff Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Mon, 24 Sep 2012 18:35:13 -0300 Subject: [PATCH] Fixed placeholder detection. Fixes #424. --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index af580364..8127c929 100644 --- a/select2.js +++ b/select2.js @@ -1587,7 +1587,7 @@ // single initSelection: function () { var selected; - if (this.opts.element.val() === "") { + if (this.opts.element.val() === "" && this.opts.element.text() === "") { this.close(); this.setPlaceholder(); } else { @@ -1921,7 +1921,7 @@ // multi initSelection: function () { var data; - if (this.opts.element.val() === "") { + if (this.opts.element.val() === "" && this.opts.element.text() === "") { this.updateSelection([]); this.close(); // set the placeholder if necessary