From 45559654bc952171c486350618e6e05ca8da0e7b Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Tue, 19 Mar 2013 08:34:34 -0700 Subject: [PATCH] fixes #1057 --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 942dfd1b..608c757d 100644 --- a/select2.js +++ b/select2.js @@ -1361,6 +1361,8 @@ the specific language governing permissions and limitations under the Apache Lic // prevent duplicate queries against the same term if (initial !== true && lastTerm && equal(term, lastTerm)) return; + $.data(this.container, "select2-last-term", term); + // if the search is currently hidden we do not alter the results if (initial !== true && (this.showSearchInput === false || !this.opened())) { return; @@ -1418,8 +1420,6 @@ the specific language governing permissions and limitations under the Apache Lic this.resultsPage = 1; - $.data(this.container, "select2-last-term", term); - opts.query({ element: opts.element, term: search.val(),