Ensure report button triggers modal

Clicking on "report" in any context closed the dropdown menu and required a second click on the dropdown to trigger the modal.
With this change, the modal opens as expected.

Reverses part of #2322
This commit is contained in:
Hugh Rundle 2023-06-26 12:22:14 +10:00
parent 65e3a31354
commit 1841d196ff
No known key found for this signature in database
GPG key ID: A7E35779918253F9

View file

@ -40,9 +40,6 @@ let BookWyrm = new (class {
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