Menu: Check that the event object is defined before checking type, in conformance to revision e2a6cdd525 and in order to make Selectmenu work again

This commit is contained in:
Felix Nagel 2012-05-16 19:17:11 +02:00
parent 31a38e972e
commit 8fbdd7cc38

View File

@ -330,7 +330,7 @@ $.widget( "ui.menu", {
// highlight active parent menu item, if any // highlight active parent menu item, if any
this.active.parent().closest( ".ui-menu-item" ).children( "a:first" ).addClass( "ui-state-active" ); this.active.parent().closest( ".ui-menu-item" ).children( "a:first" ).addClass( "ui-state-active" );
if ( event.type === "keydown" ) { if ( event && event.type === "keydown" ) {
this._close(); this._close();
} else { } else {
this.timer = this._delay(function() { this.timer = this._delay(function() {