diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-07-27 21:13:41 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-07-27 21:13:41 +0200 |
commit | 0ba493d3b4f9d6da35cadc499e9f7ebb6adb31b3 (patch) | |
tree | 83d6cd993c56e99df2667d4bdeaf07f5243f97f8 | |
parent | da7f41948ce01e797ae79ca1e4df7dda5d4cde81 (diff) | |
parent | e16e99a154d7f3bdbc7ffe56e5c74e9fe90bbd6b (diff) | |
download | jquery-ui-0ba493d3b4f9d6da35cadc499e9f7ebb6adb31b3.tar.gz jquery-ui-0ba493d3b4f9d6da35cadc499e9f7ebb6adb31b3.zip |
Merge remote branch 'kborchers/menu_focus'
-rw-r--r-- | ui/jquery.ui.menu.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index ad7a9c8c1..c55ae75c9 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -71,6 +71,18 @@ $.widget( "ui.menu", { if ( target.length ) { self.blur( event ); } + }) + .bind( "focus.menu", function( event ) { + if ( self.options.disabled ) { + return; + } + self.focus( event, $( event.target ).children( ".ui-menu-item:first" ) ); + }) + .bind( "blur.menu", function( event ) { + if ( self.options.disabled ) { + return; + } + self.collapseAll( event ); }); this.refresh(); |