diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-06 19:28:18 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-07 00:43:07 +0200 |
commit | fbe982b9fbd7ac50fc08a8e539c7a7d9be5089b2 (patch) | |
tree | 7f9a38918c2dcc4f4bb9749f748af81c6df4ee9b /tests/visual/menu | |
parent | 28017052a497c4fc62f6bb518e0f39e71ee034c4 (diff) | |
download | jquery-ui-fbe982b9fbd7ac50fc08a8e539c7a7d9be5089b2.tar.gz jquery-ui-fbe982b9fbd7ac50fc08a8e539c7a7d9be5089b2.zip |
Popup: If popup is a menu, focus the first menu item, as menubar does.
Diffstat (limited to 'tests/visual/menu')
-rw-r--r-- | tests/visual/menu/popup.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/visual/menu/popup.js b/tests/visual/menu/popup.js index a8238adb0..a5e42a884 100644 --- a/tests/visual/menu/popup.js +++ b/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); |