Enable using escape key to close navigation toggle
This commit is contained in:
parent
479eb20bec
commit
68b462f862
@ -111,4 +111,11 @@
|
||||
}
|
||||
|
||||
navbarToggle.addEventListener("click", toggleNavigation);
|
||||
|
||||
window.addEventListener("keyup", (e) => {
|
||||
if (e.key === "Escape") {
|
||||
navbarToggle.focus();
|
||||
closeNavigation();
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user