Skip to content
Permalink
Browse files

Popup: If popup is a menu, focus the first menu item, as menubar does.

  • Loading branch information...
jzaefferer committed May 6, 2011
1 parent 2801705 commit fbe982b9fbd7ac50fc08a8e539c7a7d9be5089b2
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/visual/menu/popup.js
@@ -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);

0 comments on commit fbe982b

Please sign in to comment.
You can’t perform that action at this time.