Skip to content
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

(cherry picked from commit 670f650)
  • Loading branch information...
tjvantoll authored and scottgonzalez committed Jun 21, 2013
1 parent 64d84ce commit 9b398520c5e1a313d0c1ebfa7dfd892f8b3e440c
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.menu.js
@@ -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();

0 comments on commit 9b39852

Please sign in to comment.
You can’t perform that action at this time.