Skip to content

Commit

Permalink
Merge remote branch 'kborchers/menu-expand-collapse'
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Jul 6, 2011
2 parents 96de2aa + 5d2b683 commit 0245b72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ui/jquery.ui.menu.js
Expand Up @@ -98,20 +98,20 @@ $.widget( "ui.menu", {
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();
}
}
Expand All @@ -122,7 +122,7 @@ $.widget( "ui.menu", {
event.preventDefault();
break;
case $.ui.keyCode.ESCAPE:
if ( self.left( event ) ) {
if ( self.collapse( event ) ) {
event.stopImmediatePropagation();
}
event.preventDefault();
Expand Down Expand Up @@ -344,7 +344,7 @@ $.widget( "ui.menu", {
.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()
Expand All @@ -356,7 +356,7 @@ $.widget( "ui.menu", {
}
},

right: function( event ) {
expand: function( event ) {
var self = this,
newItem = this.active && this.active.children("ul").children("li").first();

Expand Down

0 comments on commit 0245b72

Please sign in to comment.