diff --git a/app/assets/javascripts/fly_out_nav.js b/app/assets/javascripts/fly_out_nav.js index aabea56408a..ad957f132b8 100644 --- a/app/assets/javascripts/fly_out_nav.js +++ b/app/assets/javascripts/fly_out_nav.js @@ -49,7 +49,8 @@ export const hideSubLevelItems = (el) => { el.classList.remove('is-showing-fly-out'); el.classList.remove('is-over'); - subItems.style.display = 'none'; + subItems.style.display = ''; + subItems.style.transform = ''; subItems.classList.remove('is-above'); }; diff --git a/spec/javascripts/fly_out_nav_spec.js b/spec/javascripts/fly_out_nav_spec.js index ea2a4caffaf..d7b7acaa3f4 100644 --- a/spec/javascripts/fly_out_nav_spec.js +++ b/spec/javascripts/fly_out_nav_spec.js @@ -59,7 +59,7 @@ describe('Fly out sidebar navigation', () => { expect( el.querySelector('.sidebar-sub-level-items').style.display, - ).toBe('none'); + ).toBe(''); }); it('does not hude subitems on mobile', () => {