diff options
author | Felix Nagel <info@felixnagel.com> | 2013-07-01 22:23:12 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-07-01 22:23:12 +0200 |
commit | ff1bb1457921daa339fdf66582842b9838387949 (patch) | |
tree | e128c53ace933a0b8ab3adfb7dd01a8fdecffd0b | |
parent | 2c9f5a8c01c25dd755fb60e9a80a046b9d53160e (diff) | |
download | jquery-ui-ff1bb1457921daa339fdf66582842b9838387949.tar.gz jquery-ui-ff1bb1457921daa339fdf66582842b9838387949.zip |
Selectmenu: prevent widget from item looping
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index d58d4ff7b..464e94836 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -270,6 +270,10 @@ $.widget( "ui.selectmenu", { // Set focus manually for first or last item this.menu.menu( "focus", event, this.menuItems[ direction ]() ); } else { + if ( direction === "previous" && this.menu.menu( "isFirstItem" ) || direction === "next" && this.menu.menu( "isLastItem" ) ) { + return; + } + // Move to and focus next or prev item this.menu.menu( direction, event ); } |