summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r--web/static/dartboat.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index e664a8d..aacb1bc 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -158,8 +158,9 @@ document.addEventListener('DOMContentLoaded', () => {
f = e => $(`#${e.target.dataset.modal}`).style.display = 'block';
$$('[data-modal]').forEach(x => x.addEventListener('click', f));
f = e => {
- if (e.target === e.currentTarget)
- e.target.style.display = 'none';
+ if (e.target === e.currentTarget ||
+ e.target.classList.contains("modal-close"))
+ e.currentTarget.style.display = 'none';
};
$$('.modal').forEach(x => x.addEventListener('click', f));
});