From: TJ VanToll Date: Fri, 21 Jun 2013 00:40:00 +0000 (-0400) Subject: Menu: Ensure an event was passed before checking its type. Fixes #9384 - Menu: _focus... X-Git-Tag: 1.11.0-beta.1~298 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=670f650b99103bcea779f8ad0428e05cb7e37053;p=jquery-ui.git 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 --- diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 5e44e81c4..c0222629d 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -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();