Skip to content

Commit

Permalink
Fix edge case where settings/admin page sidebar would be incorrectly …
Browse files Browse the repository at this point in the history
…hidden (mastodon#17580)
  • Loading branch information
ClearlyClaire authored and atsu1125 committed Aug 28, 2022
1 parent ba27361 commit be88001
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 1 addition & 7 deletions app/javascript/packs/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,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
Expand Down
4 changes: 4 additions & 0 deletions app/javascript/styles/mastodon/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ $content-width: 840px;

& > ul {
display: none;

&.visible {
display: block;
}
}

ul a,
Expand Down

0 comments on commit be88001

Please sign in to comment.