diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-16 21:44:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 21:44:19 +0100 |
commit | 00b45b967e0c92714e1ec54a2d5c924f8b1dd38b (patch) | |
tree | d5189ec36775822501a8c4b6b0d13579ecff3b55 /app | |
parent | 1abf0f90000c86bfbc5d6ac9a976834dcd17983a (diff) |
Fix edge case where settings/admin page sidebar would be incorrectly hidden (#17580)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/packs/public.js | 8 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/admin.scss | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index c0c088646..3d0a937e1 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -276,13 +276,7 @@ function main() { }); delegate(document, '.sidebar__toggle__icon', 'click', () => { - const target = document.querySelector('.sidebar ul'); - - if (target.style.display === 'block') { - target.style.display = 'none'; - } else { - target.style.display = 'block'; - } + document.querySelector('.sidebar ul').classList.toggle('visible'); }); // Empty the honeypot fields in JS in case something like an extension diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss index f5741bd50..1921eb146 100644 --- a/app/javascript/styles/mastodon/admin.scss +++ b/app/javascript/styles/mastodon/admin.scss @@ -322,6 +322,10 @@ $content-width: 840px; & > ul { display: none; + + &.visible { + display: block; + } } ul a, |