Преглед изворни кода

a small optimization to how many times highlight is called

Igor Vaynberg пре 13 година
родитељ
комит
1e2881d5d1
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -785,7 +785,7 @@
 
         highlightUnderEvent: function (event) {
             var el = $(event.target).closest(".select2-result");            
-            if (el.length > 0) {
+            if (el.length > 0 && !el.is(".select2-highlighted")) {
         		var choices = this.results.find('.select2-result');
                 this.highlight(choices.index(el));
             }