From: Scott González Date: Mon, 19 Jul 2010 15:51:05 +0000 (-0400) Subject: Menu: Only look for .ui-menu-item elements to determine if a menu item is the first... X-Git-Tag: 1.8.3~38^2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5311fe22f327d275f6f8d885da1ce6bbc2c4a681;p=jquery-ui.git Menu: Only look for .ui-menu-item elements to determine if a menu item is the first or last element in the menu. Fixes #5528 - Autocomplete: Issue when try to navigate using up key by keyboard in IE6. --- diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 1391643ba..3f010c1f4 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -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) {