From: Rand Scullard Date: Mon, 28 Sep 2015 20:15:46 +0000 (-0400) Subject: Menu: Check that there is an active item in `_activate()` X-Git-Tag: 1.12.0-rc.2~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d21aeee8092b9c4e756606a39dd081ef3fbd5dbc;p=jquery-ui.git Menu: Check that there is an active item in `_activate()` Closes gh-1606 --- diff --git a/ui/widgets/menu.js b/ui/widgets/menu.js index c5627cc20..f63105fa7 100644 --- a/ui/widgets/menu.js +++ b/ui/widgets/menu.js @@ -270,7 +270,7 @@ return $.widget( "ui.menu", { }, _activate: function( event ) { - if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { if ( this.active.children( "[aria-haspopup='true']" ).length ) { this.expand( event ); } else {