Skip to content

Commit

Permalink
fix: make sure the top-level Dropdown menus always open/close
Browse files Browse the repository at this point in the history
  • Loading branch information
bolt-bot committed Apr 25, 2020
1 parent 6da41a1 commit 7a8b418
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ class Nav extends BaseComponent {
toggleNavPanel(e) {
const target = e.target;

target.classList.toggle('pl-is-active');

// when the Nav renders as a dropdown menu, only allow one top-level menu item to be open at a time to prevent overlap issues
if (this.layoutMode !== 'vertical' && window.innerWidth > 670) {
target.classList.toggle('pl-is-active');

this.topLevelTriggers = document.querySelectorAll(
'.pl-c-nav__link--title.pl-is-active'
);
Expand Down

0 comments on commit 7a8b418

Please sign in to comment.