Skip to content

Commit 8fbdd7c

Browse files
committed
Menu: Check that the event object is defined before checking type, in conformance to revision e2a6cdd and in order to make Selectmenu work again
1 parent 31a38e9 commit 8fbdd7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ $.widget( "ui.menu", {
330330
// highlight active parent menu item, if any
331331
this.active.parent().closest( ".ui-menu-item" ).children( "a:first" ).addClass( "ui-state-active" );
332332

333-
if ( event.type === "keydown" ) {
333+
if ( event && event.type === "keydown" ) {
334334
this._close();
335335
} else {
336336
this.timer = this._delay(function() {

0 commit comments

Comments
 (0)