Exit download modal on pressing escape key.

Adds an event listener to call closeModal() when Escape key is pressed.
This commit is contained in:
Nikhil Tanwar
2022-07-21 00:35:34 +05:30
parent 88c25b3a6c
commit d0adb4e722
2 changed files with 7 additions and 1 deletions

View File

@ -439,6 +439,12 @@
window.addEventListener('scroll', loadSubset);
window.addEventListener('keydown', function (event) {
if (event.key === "Escape" ) {
closeModal();
}
});
window.onload = async () => {
iso = new Isotope( '.book__list', {
itemSelector: '.book',