diff --git a/src/pages/funding.astro b/src/pages/funding.astro index 1cbebf0..e7faf47 100644 --- a/src/pages/funding.astro +++ b/src/pages/funding.astro @@ -647,6 +647,15 @@ const legendIcons = [ ?.addEventListener("click", () => { document.getElementById("infoModal")?.classList.add("hidden"); }); + + document.addEventListener("keydown", (event) => { + if (event.key === "Escape") { + document.getElementById("donationModal")?.classList.add("hidden"); + document.getElementById("cryptoModal")?.classList.add("hidden"); + document.getElementById("infoModal")?.classList.add("hidden"); + } + }); + const filterButtons = document.querySelectorAll(".filter-button"); const searchInput = document.getElementById( "searchInput"