break;
case $.ui.keyCode.ENTER:
if ( this.isOpen ) {
- this._selectMenu( event );
+ this._selectFocusedItem( event );
}
break;
case $.ui.keyCode.UP:
break;
case $.ui.keyCode.SPACE:
if ( this.isOpen ) {
- this._selectMenu( event );
+ this._selectFocusedItem( event );
} else {
this._toggle( event );
}
}
},
- _selectMenu: function( event ) {
- if ( !this.menuItems.eq( this.focusIndex ).hasClass( "ui-state-disabled" ) ) {
- this.menuInstance.select( event );
+ _selectFocusedItem: function( event ) {
+ var item = this.menuItems.eq( this.focusIndex );
+ if ( !item.hasClass( "ui-state-disabled" ) ) {
+ this._select( item.data( "ui-selectmenu-item" ), event );
}
},