diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-08-27 08:05:27 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-08-27 08:05:27 -0400 |
commit | 93556a8e18be972d487498a42b3916f8fff9e995 (patch) | |
tree | 4ce5cd4ea29dc214aea88cc44343a212e8ea2f55 /ui/jquery.ui.menu.js | |
parent | b22e3c36f27a9138ba2d1a665bdeded0b877ff6b (diff) | |
download | jquery-ui-93556a8e18be972d487498a42b3916f8fff9e995.tar.gz jquery-ui-93556a8e18be972d487498a42b3916f8fff9e995.zip |
Menu: If the active element no longer exists after a refresh, blur the menu.
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 78b602cce..333bc9a38 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -319,6 +319,11 @@ $.widget( "ui.menu", { .prepend( submenuCarat ); menu.attr( "aria-labelledby", item.attr( "id" ) ); }); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } }, _itemRole: function() { |