Skip to content

Commit 5311fe2

Browse files
committed
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.
1 parent a090faa commit 5311fe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,11 @@ $.widget("ui.menu", {
433433
},
434434

435435
first: function() {
436-
return this.active && !this.active.prev().length;
436+
return this.active && !this.active.prevAll(".ui-menu-item").length;
437437
},
438438

439439
last: function() {
440-
return this.active && !this.active.next().length;
440+
return this.active && !this.active.nextAll(".ui-menu-item").length;
441441
},
442442

443443
move: function(direction, edge, event) {

0 commit comments

Comments
 (0)