Skip to content

Commit

Permalink
Update main-nav.js (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenhitchon authored Jun 12, 2024
1 parent f5ad9cc commit d4443d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/main-nav/main-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Navigation {
checkIfContainsFocus(e) {
const { linkParent } = this.whichSubNavLatest()
const focusWithin = linkParent.contains(e.target)
const isButton = e.target.getAttribute('role')
const isButton = e.target.closest('a').getAttribute('role') === 'button'
if (!focusWithin && isButton) {
this.toggleSubNavDesktop()
}
Expand Down

0 comments on commit d4443d4

Please sign in to comment.