File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/uikit-workshop/src/scripts/components/pl-nav Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,11 @@ class Nav extends BaseComponent {
223223 target . classList . toggle ( 'pl-is-active' ) ;
224224
225225 // 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
226- if ( this . layoutMode !== 'vertical' && window . innerWidth > 670 ) {
226+ if (
227+ this . layoutMode !== 'vertical' &&
228+ window . innerWidth > 670 &&
229+ target . classList . contains ( 'pl-c-nav__link--title' )
230+ ) {
227231 this . topLevelTriggers = document . querySelectorAll (
228232 '.pl-c-nav__link--title.pl-is-active'
229233 ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { h } from 'preact';
22import { NavToggle } from './NavToggle' ;
33import { NavLink } from './NavLink' ;
44import { NavItem } from './NavItem' ;
5+ import { NavButton } from './NavButton' ;
56
67export const NavList = props => {
78 const { children, category, elem } = props ;
@@ -41,9 +42,9 @@ export const NavList = props => {
4142 </ div >
4243 ) )
4344 ) : (
44- < Button aria-controls = { category } onClick = { elem . toggleNavPanel } >
45+ < NavButton aria-controls = { category } onClick = { elem . toggleNavPanel } >
4546 { category }
46- </ Button >
47+ </ NavButton >
4748 ) }
4849
4950 { ( ( viewAllItems . length && nonViewAllItems . length ) ||
You can’t perform that action at this time.
0 commit comments