浏览代码

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

Signed-off-by: Igor Vaynberg <[email protected]>
Mitko Tschimev 13 年之前
父节点
当前提交
ac8a4db76f
共有 1 个文件被更改,包括 2 次插入1 次删除
  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;
                 }