From 670f650b99103bcea779f8ad0428e05cb7e37053 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Thu, 20 Jun 2013 20:40:00 -0400 Subject: [PATCH] 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 --- ui/jquery.ui.menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();