aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2011-04-16 17:24:49 +0200
committerFelix Nagel <info@felixnagel.com>2011-04-16 17:24:49 +0200
commit61a0844fb94298a4468834c9f7f6e9fcf25af301 (patch)
treedfa016a00b2432f423ba804da9769fd784d4ae8c
parent351b73989861d6d8cd1ec750aebc900779d9ab6e (diff)
downloadjquery-ui-61a0844fb94298a4468834c9f7f6e9fcf25af301.tar.gz
jquery-ui-61a0844fb94298a4468834c9f7f6e9fcf25af301.zip
fixed: keyboards loop issue, thanks to gcko, see https://github.com/fnagel/jquery-ui/issues/89
-rw-r--r--ui/jquery.ui.selectmenu.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js
index 7c0f61a7a..93f1ac858 100644
--- a/ui/jquery.ui.selectmenu.js
+++ b/ui/jquery.ui.selectmenu.js
@@ -579,7 +579,8 @@ $.widget("ui.selectmenu", {
_moveSelection: function(amt) {
var currIndex = parseInt(this._selectedOptionLi().data('index'), 10);
var newIndex = currIndex + amt;
- return this._optionLis.eq(newIndex).trigger('mouseup');
+ // do not loop when using up key
+ if (newIndex >= 0 ) return this._optionLis.eq(newIndex).trigger('mouseup');
},
_moveFocus: function(amt) {