Skip to content

Commit 7a8b418

Browse files
committed
fix: make sure the top-level Dropdown menus always open/close
1 parent 6da41a1 commit 7a8b418

File tree

1 file changed

+2
-2
lines changed
  • packages/uikit-workshop/src/scripts/components/pl-nav

1 file changed

+2
-2
lines changed

packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ class Nav extends BaseComponent {
220220
toggleNavPanel(e) {
221221
const target = e.target;
222222

223+
target.classList.toggle('pl-is-active');
224+
223225
// 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
224226
if (this.layoutMode !== 'vertical' && window.innerWidth > 670) {
225-
target.classList.toggle('pl-is-active');
226-
227227
this.topLevelTriggers = document.querySelectorAll(
228228
'.pl-c-nav__link--title.pl-is-active'
229229
);

0 commit comments

Comments
 (0)