Skip to content

Commit

Permalink
Remove ui-state-active from siblings of the expanded menu item
Browse files Browse the repository at this point in the history
Previously when a menu item was expanded the class `ui-state-active` was
not removed from the previous expanded menu item. This resulted in two
(or more if you expanded more) menu items with this class.
  • Loading branch information
arnoudhgz committed Jan 23, 2018
1 parent e411c1d commit 5714ffd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/web/mage/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ define([
return;
}

// remove the active state class from the siblings
this.active.siblings().children('.ui-state-active').removeClass('ui-state-active');

this._open(newItem.parent());

// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
Expand Down

0 comments on commit 5714ffd

Please sign in to comment.