diff options
author | Simounet <contact@simounet.net> | 2020-05-06 22:20:07 +0200 |
---|---|---|
committer | Simounet <contact@simounet.net> | 2020-05-06 22:27:11 +0200 |
commit | a5ac6046838766eb888180b4f1d0717631ed8f14 (patch) | |
tree | bef1fcaeb40a686001854f88473716767143d210 /app | |
parent | 557e810c1f2b2e662f163fc419014e80d5484e3a (diff) | |
download | wallabag-a5ac6046838766eb888180b4f1d0717631ed8f14.tar.gz wallabag-a5ac6046838766eb888180b4f1d0717631ed8f14.tar.zst wallabag-a5ac6046838766eb888180b4f1d0717631ed8f14.zip |
Side nav hidden on mobile tag adding
Diffstat (limited to 'app')
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
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'; | |||
17 | /* Theme style */ | 17 | /* Theme style */ |
18 | import './css/index.scss'; | 18 | import './css/index.scss'; |
19 | 19 | ||
20 | const mobileMaxWidth = 993; | ||
21 | |||
20 | const stickyNav = () => { | 22 | const stickyNav = () => { |
21 | const nav = $('.js-entry-nav-top'); | 23 | const nav = $('.js-entry-nav-top'); |
22 | $('[data-toggle="actions"]').click(() => { | 24 | $('[data-toggle="actions"]').click(() => { |
@@ -81,6 +83,9 @@ $(document).ready(() => { | |||
81 | $('#nav-btn-add-tag').on('click', () => { | 83 | $('#nav-btn-add-tag').on('click', () => { |
82 | $('.nav-panel-add-tag').toggle(100); | 84 | $('.nav-panel-add-tag').toggle(100); |
83 | $('.nav-panel-menu').addClass('hidden'); | 85 | $('.nav-panel-menu').addClass('hidden'); |
86 | if (window.innerWidth < mobileMaxWidth) { | ||
87 | $('.side-nav').sideNav('hide'); | ||
88 | } | ||
84 | $('#tag_label').focus(); | 89 | $('#tag_label').focus(); |
85 | return false; | 90 | return false; |
86 | }); | 91 | }); |