From a5ac6046838766eb888180b4f1d0717631ed8f14 Mon Sep 17 00:00:00 2001 From: Simounet Date: Wed, 6 May 2020 22:20:07 +0200 Subject: Side nav hidden on mobile tag adding --- app/Resources/static/themes/material/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Resources') diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index d8f5628c..2414c0fc 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -17,6 +17,8 @@ import './js/shortcuts/entry'; /* Theme style */ import './css/index.scss'; +const mobileMaxWidth = 993; + const stickyNav = () => { const nav = $('.js-entry-nav-top'); $('[data-toggle="actions"]').click(() => { @@ -81,6 +83,9 @@ $(document).ready(() => { $('#nav-btn-add-tag').on('click', () => { $('.nav-panel-add-tag').toggle(100); $('.nav-panel-menu').addClass('hidden'); + if (window.innerWidth < mobileMaxWidth) { + $('.side-nav').sideNav('hide'); + } $('#tag_label').focus(); return false; }); -- cgit v1.2.3