diff --git a/build/ui-bundle.zip b/build/ui-bundle.zip index a75e00a3..de7d9747 100644 Binary files a/build/ui-bundle.zip and b/build/ui-bundle.zip differ diff --git a/src/js/01-nav.js b/src/js/01-nav.js index 15ee6841..06db97d8 100644 --- a/src/js/01-nav.js +++ b/src/js/01-nav.js @@ -14,6 +14,15 @@ } } + function addVersionPickerEventListeners () { + document.getElementById('navbarProductName').addEventListener('click', versionPickerToggleHandler) + + const navbarProductVersionEl = document.getElementById('navbarProductVersion') + if (navbarProductVersionEl) { + navbarProductVersionEl.addEventListener('click', versionPickerToggleHandler) + } + } + if (document.getElementsByClassName('nav-container').length > 0) { var navContainer = document.querySelector('.nav-container') var navToggle = document.querySelector('.nav-toggle') @@ -22,6 +31,8 @@ // NOTE don't let click events propagate outside of nav container navContainer.addEventListener('click', concealEvent) + addVersionPickerEventListeners() + var menuPanel = navContainer.querySelector('[data-panel=menu]') if (!menuPanel) return var nav = navContainer.querySelector('.nav') @@ -55,13 +66,6 @@ } }) - document.getElementById('navbarProductName').addEventListener('click', versionPickerToggleHandler) - - const navbarProductVersionEl = document.getElementById('navbarProductVersion') - if (navbarProductVersionEl) { - navbarProductVersionEl.addEventListener('click', versionPickerToggleHandler) - } - // NOTE prevent text from being selected by double click menuPanel.addEventListener('mousedown', function (e) { if (e.detail > 1) e.preventDefault()