authorgravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-08-06 15:01:55+02:00
committergravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-08-06 15:01:55+02:00
log4ef567ba41b7b9f83eb26d52128125b6837beb2f
treee9869b31101922fbd374d679a24b95715d7aec0e
parent5c9826630dfb8a2f59663a569bb8e452359c9524

feat: make help modal disappear if you click outside it


1 files changed, 6 insertions(+), 0 deletions(-)

lib/docs/main.js+6
...@@ -132,6 +132,12 @@ var zigAnalysis;...@@ -132,6 +132,12 @@ var zigAnalysis;
132 location.hash = "#root";132 location.hash = "#root";
133 }133 }
134134
135 // make the modal disappear if you click outside it
136 domHelpModal.addEventListener("click", ev => {
137 if (ev.target.className == "help-modal")
138 domHelpModal.classList.add("hidden");
139 })
140
135 window.addEventListener("hashchange", onHashChange, false);141 window.addEventListener("hashchange", onHashChange, false);
136 window.addEventListener("keydown", onWindowKeyDown, false);142 window.addEventListener("keydown", onWindowKeyDown, false);
137 onHashChange();143 onHashChange();