Skip to content

Commit

Permalink
fix: navbar mobile focus
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Stagi <[email protected]>
  • Loading branch information
Fupete and astagi authored Dec 18, 2023
1 parent 4d80596 commit b29aebb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/plugins/navbar-collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ const SELECTOR_BTN_MENU_CLOSE = '.close-menu'
const SELECTOR_BTN_BACK = '.it-back-button'
const SELECTOR_OVERLAY = '.overlay'
const SELECTOR_MENU_WRAPPER = '.menu-wrapper'
const SELECTOR_NAVLINK = 'a.nav-link'
const SELECTOR_NAVLINK = '.nav-link'
const SELECTOR_MEGAMENUNAVLINK = '.nav-item .list-item'
const SELECTOR_HEADINGLINK = '.it-heading-link'
const SELECTOR_FOOTERLINK = '.it-footer-link'

class NavBarCollapsible extends BaseComponent {
constructor(element) {
Expand All @@ -62,7 +64,10 @@ class NavBarCollapsible extends BaseComponent {
this._menuWrapper = SelectorEngine.findOne(SELECTOR_MENU_WRAPPER, this._element)
this._overlay = null
this._setOverlay()
this._menuItems = SelectorEngine.find([SELECTOR_NAVLINK, SELECTOR_MEGAMENUNAVLINK, SELECTOR_BTN_MENU_CLOSE].join(','), this._element)
this._menuItems = SelectorEngine.find(
[SELECTOR_NAVLINK, SELECTOR_MEGAMENUNAVLINK, SELECTOR_HEADINGLINK, SELECTOR_FOOTERLINK, SELECTOR_BTN_MENU_CLOSE].join(','),
this._element
)

this._bindEvents()
}
Expand Down

0 comments on commit b29aebb

Please sign in to comment.