From d21aeee8092b9c4e756606a39dd081ef3fbd5dbc Mon Sep 17 00:00:00 2001 From: Rand Scullard Date: Mon, 28 Sep 2015 16:15:46 -0400 Subject: [PATCH] Menu: Check that there is an active item in `_activate()` Closes gh-1606 --- ui/widgets/menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.39.5