Skip to content

Commit

Permalink
Side nav hidden on mobile tag adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Simounet committed May 6, 2020
1 parent 557e810 commit a5ac604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/Resources/static/themes/material/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -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;
});
Expand Down
2 changes: 1 addition & 1 deletion web/wallassets/material.js

Large diffs are not rendered by default.

0 comments on commit a5ac604

Please sign in to comment.