From 9c864f1da01bef52c32f9d3c3a8cdd0cc2dadd35 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 5 Jul 2012 11:24:36 +0300 Subject: [PATCH] clear the ' ' placeholder on open --- select2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/select2.js b/select2.js index 7a02b93b..208bece6 100755 --- a/select2.js +++ b/select2.js @@ -759,6 +759,8 @@ if (!this.shouldOpen()) return false; + if (this.search.val() === " ") { this.search.val(""); } + this.container.addClass("select2-dropdown-open").addClass("select2-container-active"); if(this.dropdown[0] !== this.body.children().last()[0]) { // ensure the dropdown is the last child of body, so the z-index is always respected correctly