From b272691e37a35a43a0f320b6c4ab0a623830caa4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Thu, 30 Jul 2026 16:17:31 -0600 Subject: [PATCH] Allow closing via click. --- src/pages/notes/[...id].astro | 5 +++-- src/utils/modal.js | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/notes/[...id].astro b/src/pages/notes/[...id].astro index 3a478fa..d8e073d 100644 --- a/src/pages/notes/[...id].astro +++ b/src/pages/notes/[...id].astro @@ -61,8 +61,9 @@ const meta = `{ + \ No newline at end of file diff --git a/src/utils/modal.js b/src/utils/modal.js index 4c9f135..6b32a30 100644 --- a/src/utils/modal.js +++ b/src/utils/modal.js @@ -14,7 +14,10 @@ export const bindModals = () => { dialog[0]?.setAttribute('data-scripture', scripture); dialog[0]?.classList.remove("hidden"); //document.body.classList.add("overflow-hidden"); - }); }); + + dialog[0]?.addEventListener('click', (evt) => { + evt.target === dialog[0] && dialog[0]?.close(); + }); }; \ No newline at end of file