File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,9 @@ $.widget("ui.menu", {
229
229
// need to remove the attribute before adding it for the screenreader to pick up the change
230
230
// see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
231
231
this . element . removeAttr ( "aria-activedescendant" ) . attr ( "aria-activedescendant" , self . itemId )
232
+
233
+ // highlight active parent menu item, if any
234
+ this . active . parent ( ) . closest ( ".ui-menu-item" ) . children ( "a:first" ) . addClass ( "ui-state-active" ) ;
232
235
233
236
self . timer = setTimeout ( function ( ) {
234
237
self . _close ( ) ;
@@ -277,8 +280,6 @@ $.widget("ui.menu", {
277
280
) ;
278
281
279
282
submenu . show ( ) . position ( position ) ;
280
-
281
- this . active . find ( ">a:first" ) . addClass ( "ui-state-active" ) ;
282
283
} ,
283
284
284
285
closeAll : function ( ) {
You can’t perform that action at this time.
0 commit comments