mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Menu: Improve first and last methods to take non-menuitem items into account
This commit is contained in:
4
ui/jquery.ui.menu.js
vendored
4
ui/jquery.ui.menu.js
vendored
@@ -155,11 +155,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) {
|
||||
|
||||
Reference in New Issue
Block a user