]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Only look for .ui-menu-item elements to determine if a menu item is the first...
authorScott González <scott.gonzalez@gmail.com>
Mon, 19 Jul 2010 15:51:05 +0000 (11:51 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 19 Jul 2010 15:51:05 +0000 (11:51 -0400)
ui/jquery.ui.autocomplete.js

index 1391643ba5fb91dc4d62f1de33039d6b14392734..3f010c1f4c9af0c490ca8b383d04f059c883f017 100644 (file)
@@ -433,11 +433,11 @@ $.widget("ui.menu", {
        },
 
        first: function() {
-               return this.active && !this.active.prev().length;
+               return this.active && !this.active.prevAll(".ui-menu-item").length;
        },
 
        last: function() {
-               return this.active && !this.active.next().length;
+               return this.active && !this.active.nextAll(".ui-menu-item").length;
        },
 
        move: function(direction, edge, event) {