]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Ensure an event was passed before checking its type. Fixes #9384 - Menu: _focus...
authorTJ VanToll <tj.vantoll@gmail.com>
Fri, 21 Jun 2013 00:40:00 +0000 (20:40 -0400)
committerTJ VanToll <tj.vantoll@gmail.com>
Fri, 21 Jun 2013 00:40:00 +0000 (20:40 -0400)
ui/jquery.ui.menu.js

index 5e44e81c47485009598a163839e449c8e3d235ff..c0222629d5fd6b23304ec0b3a31757271e91ad08 100644 (file)
@@ -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();