From 86a81900804ec19a9d0cb51b1e718c2568856ec1 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 14 Mar 2013 11:39:45 -0700 Subject: [PATCH] Loading icon doesn't disappear when using tags with auto tokenization. fixes #1005 --- select2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index aee7fbcd..a65729d6 100644 --- a/select2.js +++ b/select2.js @@ -1418,7 +1418,10 @@ the specific language governing permissions and limitations under the Apache Lic var def; // default choice // ignore a response if the select2 has been closed before it was received - if (!this.opened()) return; + if (!this.opened()) { + this.search.removeClass("select2-active"); + return; + } // save context, if any this.context = (data.context===undefined) ? null : data.context; @@ -2308,6 +2311,7 @@ the specific language governing permissions and limitations under the Apache Lic self.postprocessResults(); }, + // multi tokenize: function() { var input = this.search.val(); input = this.opts.tokenizer(input, this.data(), this.bind(this.onSelect), this.opts);