Allow clicking on the entire care for seleting sources

This commit is contained in:
Eli Ribble 2026-03-09 22:22:04 +00:00
parent 52f2a75ec5
commit cd47aaba94
No known key found for this signature in database

View file

@ -173,6 +173,21 @@
setLocationInputs(l);
});
document.querySelectorAll(".source-card").forEach((card) => {
card.style.cursor = "pointer";
card.addEventListener("click", function (e) {
// Don't toggle if user clicked directly on the checkbox or label
if (e.target.type === "checkbox" || e.target.tagName === "LABEL") {
return;
}
const checkbox = this.querySelector(".form-check-input");
checkbox.checked = !checkbox.checked;
// Trigger change event in case you have listeners on the checkbox
checkbox.dispatchEvent(new Event("change", { bubbles: true }));
});
});
});
</script>
<style></style>