Menu: Ensure an event was passed before checking its type. Fixes #9384 - Menu: _focus function forgets null check with doing a pattern match on event.type

(cherry picked from commit 670f650b99)
This commit is contained in:
TJ VanToll 2013-06-20 20:40:00 -04:00 committed by Scott González
parent 64d84cebe1
commit 9b398520c5

View File

@ -384,7 +384,7 @@ $.widget( "ui.menu", {
}
nested = item.children( ".ui-menu" );
if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
this._startOpening(nested);
}
this.activeMenu = item.parent();