Skip to content

Commit

Permalink
Popup: If popup is a menu, focus the first menu item, as menubar does.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed May 6, 2011
1 parent 2801705 commit fbe982b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/visual/menu/popup.js
Expand Up @@ -120,6 +120,10 @@ $.widget( "ui.popup", {
.position( position )
.focus();

if (this.element.is(":ui-menu")) {
this.element.menu("focus", event, this.element.children( "li" ).first() );
}

// take trigger out of tab order to allow shift-tab to skip trigger
this.options.trigger.attr("tabindex", -1);

Expand Down

0 comments on commit fbe982b

Please sign in to comment.