From 4e8da110d66d02dc18632754d06c215389b97eef Mon Sep 17 00:00:00 2001 From: barryhunter Date: Mon, 15 Apr 2013 00:25:51 +0200 Subject: [PATCH] Bugfix for Resetting Scrollpoint on Multi-select Duplicating pull request #974 - which seemed to only fix it for 'single' version. Have copied the same condition into the one for 'multi' case. There may be a better way, but in my testing this seems to have worked. --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 7b08bf9e..a981c9cb 100644 --- a/select2.js +++ b/select2.js @@ -2553,7 +2553,7 @@ the specific language governing permissions and limitations under the Apache Lic }, // multi - postprocessResults: function () { + postprocessResults: function (dummy1, dummy2, noHighlightUpdate) { var val = this.getVal(), choices = this.results.find(".select2-result"), compound = this.results.find(".select2-result-with-children"), @@ -2576,7 +2576,7 @@ the specific language governing permissions and limitations under the Apache Lic } }); - if (this.highlight() == -1){ + if (this.highlight() == -1 && noHighlightUpdate !== false){ self.highlight(0); }