Permalink
Browse files

Menu: Ensure an event was passed before checking its type. Fixes #938…

…4 - Menu: _focus function forgets null check with doing a pattern match on event.type
  • Loading branch information...
tjvantoll committed Jun 21, 2013
1 parent 628a141 commit 670f650b99103bcea779f8ad0428e05cb7e37053
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.menu.js
View
@@ -389,7 +389,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();

0 comments on commit 670f650

Please sign in to comment.