mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Menu: Improve first and last methods to take non-menuitem items into account
This commit is contained in:
parent
d5df3a5a56
commit
bf977a6770
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user