diff --git a/src/components/main-navigation/main-navigation.js b/src/components/main-navigation/main-navigation.js index 596abcb0..38fe9e71 100644 --- a/src/components/main-navigation/main-navigation.js +++ b/src/components/main-navigation/main-navigation.js @@ -226,8 +226,9 @@ class Navigation { checkIfContainsFocus() { const { linkParent } = this.whichSubNavLatest() const focusWithin = linkParent.contains(document.activeElement) - if (!focusWithin) { - this.toggleSubnavDesktop(true) + const isNavLinkActive = document.activeElement.getAttribute('class').indexOf('nsw-navigation__link') > -1 + if (!focusWithin && isNavLinkActive) { + this.toggleSubnavDesktop() } }