mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
feat: make help modal disappear if you click outside it
This commit is contained in:
parent
5c9826630d
commit
4ef567ba41
@ -132,6 +132,12 @@ var zigAnalysis;
|
||||
location.hash = "#root";
|
||||
}
|
||||
|
||||
// make the modal disappear if you click outside it
|
||||
domHelpModal.addEventListener("click", ev => {
|
||||
if (ev.target.className == "help-modal")
|
||||
domHelpModal.classList.add("hidden");
|
||||
})
|
||||
|
||||
window.addEventListener("hashchange", onHashChange, false);
|
||||
window.addEventListener("keydown", onWindowKeyDown, false);
|
||||
onHashChange();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user