Fix login menu
This commit is contained in:
parent
e140dba63c
commit
ca53f98c25
@ -331,8 +331,6 @@ button > * {
|
||||
padding-top: .5em;
|
||||
}
|
||||
|
||||
.show { display: block; }
|
||||
|
||||
.icon { height: 1.4em; }
|
||||
|
||||
.menu-title { text-decoration: underline; }
|
||||
|
File diff suppressed because one or more lines are too long
8
js/ui.js
8
js/ui.js
@ -421,10 +421,10 @@ export default class uUI {
|
||||
* Toggle user menu visibility
|
||||
*/
|
||||
showUserMenu() {
|
||||
if (this.userDropdown.classList.contains('show')) {
|
||||
this.userDropdown.classList.remove('show');
|
||||
if (this.userDropdown.style.display === 'block') {
|
||||
this.userDropdown.style.display = 'none';
|
||||
} else {
|
||||
this.userDropdown.classList.add('show');
|
||||
this.userDropdown.style.display = 'block';
|
||||
window.addEventListener('click', this.hideUserMenu, true);
|
||||
}
|
||||
}
|
||||
@ -435,7 +435,7 @@ export default class uUI {
|
||||
*/
|
||||
hideUserMenu(e) {
|
||||
const parent = e.target.parentElement;
|
||||
this.userDropdown.classList.remove('show');
|
||||
this.userDropdown.style.display = 'none';
|
||||
window.removeEventListener('click', this.hideUserMenu, true);
|
||||
if (!parent.classList.contains('dropdown')) {
|
||||
e.stopPropagation();
|
||||
|
Loading…
x
Reference in New Issue
Block a user