Allow closing via click.
This commit is contained in:
parent
2aeb21a7ba
commit
b272691e37
2 changed files with 7 additions and 3 deletions
|
|
@ -61,8 +61,9 @@ const meta = `{
|
|||
<Content />
|
||||
</div>
|
||||
<dialog data-scripture=""
|
||||
class="p-8 bg-white rounded-sm w-full max-w-md m-auto flex-col flex hidden">
|
||||
<div tabindex="-1" autofocus></div>
|
||||
class="p-0 bg-white rounded-sm w-full max-w-md m-auto flex-col flex hidden">
|
||||
<div tabindex="-1" autofocus class="p-4">
|
||||
<p>Scripture dialog.</p></dialog>
|
||||
</div>
|
||||
</article>
|
||||
</Layout>
|
||||
|
|
@ -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();
|
||||
});
|
||||
};
|
||||
Loading…
Reference in a new issue