mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-11 13:48:13 +03:00
Updated dropdowns to close all others before opening
This commit is contained in:
@ -14,7 +14,7 @@ class DropDown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show(event) {
|
show(event) {
|
||||||
this.hide();
|
this.hideAll();
|
||||||
|
|
||||||
this.menu.style.display = 'block';
|
this.menu.style.display = 'block';
|
||||||
this.menu.classList.add('anim', 'menuIn');
|
this.menu.classList.add('anim', 'menuIn');
|
||||||
@ -44,6 +44,12 @@ class DropDown {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideAll() {
|
||||||
|
for (let dropdown of window.components.dropdown) {
|
||||||
|
dropdown.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
this.menu.style.display = 'none';
|
this.menu.style.display = 'none';
|
||||||
this.menu.classList.remove('anim', 'menuIn');
|
this.menu.classList.remove('anim', 'menuIn');
|
||||||
|
Reference in New Issue
Block a user