event.stopImmediatePropagation();
break;
case $.ui.keyCode.LEFT:
- if (self.left( event )) {
+ if (self.collapse( event )) {
event.stopImmediatePropagation();
}
event.preventDefault();
break;
case $.ui.keyCode.RIGHT:
- if (self.right( event )) {
+ if (self.expand( event )) {
event.stopImmediatePropagation();
}
event.preventDefault();
break;
case $.ui.keyCode.ENTER:
if ( self.active.children( "a[aria-haspopup='true']" ).length ) {
- if ( self.right( event ) ) {
+ if ( self.expand( event ) ) {
event.stopImmediatePropagation();
}
}
event.preventDefault();
break;
case $.ui.keyCode.ESCAPE:
- if ( self.left( event ) ) {
+ if ( self.collapse( event ) ) {
event.stopImmediatePropagation();
}
event.preventDefault();
.removeClass( "ui-state-active" );
},
- left: function( event ) {
+ collapse: function( event ) {
var newItem = this.active && this.active.parents("li:not(.ui-menubar-item)").first();
if ( newItem && newItem.length ) {
this.active.parent()
}
},
- right: function( event ) {
+ expand: function( event ) {
var self = this,
newItem = this.active && this.active.children("ul").children("li").first();