Explorar o código

bugfix moveHighlight: disabled list elements were highlighted now they are ignored

Signed-off-by: Igor Vaynberg <[email protected]>
Mitko Tschimev %!s(int64=13) %!d(string=hai) anos
pai
achega
ac8a4db76f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      select2.js

+ 2 - 1
select2.js

@@ -823,7 +823,8 @@
 
             while (index > -1 && index < choices.length) {
                 index += delta;
-                if ($(choices[index]).hasClass("select2-result-selectable")) {
+                var choice = $(choices[index]);
+                if (choice.hasClass("select2-result-selectable") && !choice.hasClass("select2-disabled")) {
                     this.highlight(index);
                     break;
                 }