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