aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2011-03-17 14:23:35 +0100
committerjzaefferer <joern.zaefferer@gmail.com>2011-03-17 14:23:35 +0100
commitd4a81ec0432595c90a1808220ebd66ef6b6c8511 (patch)
treeaba59ad4db55022fe33537cf3a856be32d801947 /tests
parentb53f242d2cbb0faf680f905914c2197d95c03735 (diff)
downloadjquery-ui-d4a81ec0432595c90a1808220ebd66ef6b6c8511.tar.gz
jquery-ui-d4a81ec0432595c90a1808220ebd66ef6b6c8511.zip
Menubar: Put focus back to button when closing menu
Diffstat (limited to 'tests')
-rw-r--r--tests/visual/menu/menubar.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js
index 1da54d532..9826a7e69 100644
--- a/tests/visual/menu/menubar.js
+++ b/tests/visual/menu/menubar.js
@@ -92,8 +92,10 @@ $.widget("ui.menubar", {
self._bind({
keyup: function(event) {
if (event.keyCode == $.ui.keyCode.ESCAPE) {
- if (self.active.menu("left") !== true) {
- self._close();
+ if (self.active.menu("left", event) !== true) {
+ self._close( event );
+ // bypass the focus event handler above
+ self.active.prev()[0].focus();
}
}
}