mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Merge pull request #2322 from obrenckle/menus_overlap
Close dropdown menu when opening one of its modal
This commit is contained in:
commit
43202f5bb7
2 changed files with 6 additions and 5 deletions
|
@ -67,7 +67,7 @@ details.dropdown .dropdown-menu a:focus-visible {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
z-index: 35;
|
||||
}
|
||||
|
||||
details .dropdown-menu > * {
|
||||
|
|
|
@ -38,11 +38,12 @@ let BookWyrm = new (class {
|
|||
.querySelectorAll("[data-modal-open]")
|
||||
.forEach((node) => node.addEventListener("click", this.handleModalButton.bind(this)));
|
||||
|
||||
document
|
||||
.querySelectorAll("details.dropdown")
|
||||
.forEach((node) =>
|
||||
node.addEventListener("toggle", this.handleDetailsDropdown.bind(this))
|
||||
document.querySelectorAll("details.dropdown").forEach((node) => {
|
||||
node.addEventListener("toggle", this.handleDetailsDropdown.bind(this));
|
||||
node.querySelectorAll("[data-modal-open]").forEach((modal_node) =>
|
||||
modal_node.addEventListener("click", () => (node.open = false))
|
||||
);
|
||||
});
|
||||
|
||||
document
|
||||
.querySelector("#barcode-scanner-modal")
|
||||
|
|
Loading…
Reference in a new issue