From 64256f27f2e33ca92f20b1ab8c6fbe7bc5e8294f Mon Sep 17 00:00:00 2001 From: Joshua Jonah Date: Mon, 12 May 2014 21:44:27 -0400 Subject: [PATCH] Stopped refresh to top when `closeOnSelect: false` Not really sure how the noHighlightUpdate variable is supposed to work, it is undefined all the time so it appears to be broken. I just referred to `this.opts.closeOnSelect` to get the status directly. --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 580d32ed..5a1bc190 100644 --- a/select2.js +++ b/select2.js @@ -3107,7 +3107,7 @@ the specific language governing permissions and limitations under the Apache Lic } }); - if (this.highlight() == -1 && noHighlightUpdate !== false){ + if (this.highlight() == -1 && noHighlightUpdate !== false && this.opts.closeOnSelect === true){ self.highlight(0); }