aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.menubar.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2011-07-13 11:03:25 -0400
committerJörn Zaefferer <joern.zaefferer@gmail.com>2011-07-13 11:03:31 -0400
commit7856b264a297d78762f599611580804b92afd1c0 (patch)
tree1f2ecbd3e263609127ea4248c12fd1e46d7f0c0d /ui/jquery.ui.menubar.js
parent06676f46966d43b6ba169363d751074645c8c303 (diff)
downloadjquery-ui-7856b264a297d78762f599611580804b92afd1c0.tar.gz
jquery-ui-7856b264a297d78762f599611580804b92afd1c0.zip
Menubar: Trigger select event after running all other methods. Allows the select-handler to destroy the widget without errors.
Diffstat (limited to 'ui/jquery.ui.menubar.js')
-rw-r--r--ui/jquery.ui.menubar.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/jquery.ui.menubar.js b/ui/jquery.ui.menubar.js
index 3df6d9a53..e28ea3e3c 100644
--- a/ui/jquery.ui.menubar.js
+++ b/ui/jquery.ui.menubar.js
@@ -49,10 +49,10 @@ $.widget( "ui.menubar", {
},
select: function( event, ui ) {
ui.item.parents( "ul.ui-menu:last" ).hide();
- that._trigger( "select", event, ui );
that._close();
// TODO what is this targetting? there's probably a better way to access it
$(event.target).prev().focus();
+ that._trigger( "select", event, ui );
}
})
.hide()
@@ -94,7 +94,7 @@ $.widget( "ui.menubar", {
if( that.options.autoExpand ) {
clearTimeout( that.timer );
}
-
+
that._open( event, menu );
}
})
@@ -120,7 +120,7 @@ $.widget( "ui.menubar", {
.attr( "role", "menuitem" )
.attr( "aria-haspopup", "true" )
.wrapInner( "<span class='ui-button-text'></span>" );
-
+
if ( that.options.autoExpand ) {
input.bind( "mouseleave.menubar", function( event ) {
that.timer = setTimeout( function() {