diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-03-17 15:37:27 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-03-17 15:37:27 +0100 |
commit | cb17d6d209e8fa82c920042ce8407cd592c2e798 (patch) | |
tree | d19e56a5d99c5552ec63b635de89826f5929a93f | |
parent | 24d1952045f1020972ecfba2cf3beadeed05ce50 (diff) | |
download | jquery-ui-cb17d6d209e8fa82c920042ce8407cd592c2e798.tar.gz jquery-ui-cb17d6d209e8fa82c920042ce8407cd592c2e798.zip |
Menubar: Another fix for tab/focus handling
-rw-r--r-- | tests/visual/menu/menubar.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/visual/menu/menubar.js b/tests/visual/menu/menubar.js index 35d0cc24f..3f4dba723 100644 --- a/tests/visual/menu/menubar.js +++ b/tests/visual/menu/menubar.js @@ -41,8 +41,8 @@ $.widget("ui.menubar", { event.preventDefault(); break; }; - }).blur(function() { - self._close(); + }).blur(function( event ) { + self._close( event ); }); }); items.each(function() { @@ -97,7 +97,9 @@ $.widget("ui.menubar", { }); self._bind(document, { click: function(event) { - self.open && !$(event.target).closest(".ui-menubar").length && self._close(); + if (self.open && !$(event.target).closest(".ui-menubar").length) { + self._close(); + } } }) self._bind({ @@ -125,10 +127,10 @@ $.widget("ui.menubar", { }, _open: function(event, menu) { - // TODO refactor with _close + // almost the same as _close above, but don't remove tabIndex if (this.active) { this.active.menu("closeAll").hide(); - this.active.prev().removeClass("ui-state-active").removeAttr("tabIndex"); + this.active.prev().removeClass("ui-state-active"); } clearTimeout(this.timer); this.open = true; |