diff options
author | Kris Borchers <kris.borchers@gmail.com> | 2013-10-17 23:07:39 -0500 |
---|---|---|
committer | Kris Borchers <kris.borchers@gmail.com> | 2013-10-18 22:14:49 -0500 |
commit | 52307ebadbca3f403549140e1d34f08bc07bf8ce (patch) | |
tree | a930c7da75c2cf3f749c71812ef1a94469620b04 /ui | |
parent | 14065dc23bb453b6c30138f225c9db728dd7e455 (diff) | |
download | jquery-ui-52307ebadbca3f403549140e1d34f08bc07bf8ce.tar.gz jquery-ui-52307ebadbca3f403549140e1d34f08bc07bf8ce.zip |
Menu: More precise removal of ui-state-active class for easier CSS overrides. Fixes #9532 - Need a way in Menu to keep ui-state-active class on selected item
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.menu.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 059f80b30..b0ff38894 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -371,7 +371,7 @@ $.widget( "ui.menu", { this._scrollIntoView( item ); this.active = item.first(); - focused = this.active.addClass( "ui-state-focus" ); + focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); // Only update aria-activedescendant if there's a role // otherwise we assume focus is managed elsewhere if ( this.options.role ) { @@ -498,7 +498,7 @@ $.widget( "ui.menu", { .attr( "aria-hidden", "true" ) .attr( "aria-expanded", "false" ) .end() - .find( ".ui-state-active" ) + .find( ".ui-state-active" ).not( ".ui-state-focus" ) .removeClass( "ui-state-active" ); }, |