From dd3e7202abdf5b438e4cc9c65c50622e817dc459 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 9 Aug 2017 15:32:56 +0100 Subject: Removed display styles when hiding the fly out navigation Closes #36224 --- app/assets/javascripts/fly_out_nav.js | 3 ++- spec/javascripts/fly_out_nav_spec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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', () => { -- cgit v1.2.1