Skip to content

Commit fbe982b

Browse files
committed
Popup: If popup is a menu, focus the first menu item, as menubar does.
1 parent 2801705 commit fbe982b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/visual/menu/popup.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ $.widget( "ui.popup", {
120120
.position( position )
121121
.focus();
122122

123+
if (this.element.is(":ui-menu")) {
124+
this.element.menu("focus", event, this.element.children( "li" ).first() );
125+
}
126+
123127
// take trigger out of tab order to allow shift-tab to skip trigger
124128
this.options.trigger.attr("tabindex", -1);
125129

0 commit comments

Comments
 (0)