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 {
223
223
target . classList . toggle ( 'pl-is-active' ) ;
224
224
225
225
// 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
+ ) {
227
231
this . topLevelTriggers = document . querySelectorAll (
228
232
'.pl-c-nav__link--title.pl-is-active'
229
233
) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { h } from 'preact';
2
2
import { NavToggle } from './NavToggle' ;
3
3
import { NavLink } from './NavLink' ;
4
4
import { NavItem } from './NavItem' ;
5
+ import { NavButton } from './NavButton' ;
5
6
6
7
export const NavList = props => {
7
8
const { children, category, categoryName, elem } = props ;
@@ -41,9 +42,9 @@ export const NavList = props => {
41
42
</ div >
42
43
) )
43
44
) : (
44
- < Button aria-controls = { category } onClick = { elem . toggleNavPanel } >
45
+ < NavButton aria-controls = { category } onClick = { elem . toggleNavPanel } >
45
46
{ categoryName }
46
- </ Button >
47
+ </ NavButton >
47
48
) }
48
49
49
50
{ ( ( viewAllItems . length && nonViewAllItems . length ) ||
You can’t perform that action at this time.
0 commit comments