Browse Source

Merge pull request #768 from bcoughlan/master

Fix issue introduced by 20950e0.
Igor Vaynberg 12 years ago
parent
commit
d0410144ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1126,7 +1126,7 @@ the specific language governing permissions and limitations under the Apache Lic
         highlightUnderEvent: function (event) {
         highlightUnderEvent: function (event) {
             var el = $(event.target).closest(".select2-result-selectable");
             var el = $(event.target).closest(".select2-result-selectable");
             if (el.length > 0 && !el.is(".select2-highlighted")) {
             if (el.length > 0 && !el.is(".select2-highlighted")) {
-        		var choices = this.results.find('.select2-result');
+        		var choices = this.results.find('.select2-result:visible');
                 this.highlight(choices.index(el));
                 this.highlight(choices.index(el));
             } else if (el.length == 0) {
             } else if (el.length == 0) {
                 // if we are over an unselectable item remove al highlights
                 // if we are over an unselectable item remove al highlights