Permalink
Browse files

Can't shortcut math <= operators

  • Loading branch information...
1 parent e5893b2 commit ad725cc396e9b7216b59fcb8b86d06939d83e69b @simeonf committed Jul 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.yaselect.js
View
2 jquery.yaselect.js
@@ -46,7 +46,7 @@ jQuery.fn.yaselect = function(options) {
.appendTo(anchor);
wrap
.mousedown(function(e) { jselect.click(); })
- .keydown(function(e) { if (e.which == 13 || e.which == 32 || (37 <= e.which <= 40)) { e.preventDefault(); jselect.click(); } }); /* preventDefault avoid pagescroll */
+ .keydown(function(e) { if (jQuery.inArray(e.which, [13, 32, 37, 38, 39, 40]) != -1) { e.preventDefault(); jselect.click(); } }); /* preventDefault avoid pagescroll */
select.size = Math.min(select.options.length, options.size || 10);
confirm();
});

0 comments on commit ad725cc

Please sign in to comment.