Menu: Check that the event object is defined before checking type

This commit is contained in:
kborchers
2012-04-14 16:00:19 -04:00
parent 26d6952bd2
commit e2a6cdd525

View File

@@ -294,7 +294,7 @@ $.widget( "ui.menu", {
focus: function( event, item ) {
var nested, borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
this.blur( event, event.type == "focus" );
this.blur( event, event && event.type == "focus" );
if ( this._hasScroll() ) {
borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;