From 61a0844fb94298a4468834c9f7f6e9fcf25af301 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sat, 16 Apr 2011 17:24:49 +0200 Subject: [PATCH] fixed: keyboards loop issue, thanks to gcko, see https://github.com/fnagel/jquery-ui/issues/89 --- ui/jquery.ui.selectmenu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.39.5