mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Exit download modal on pressing escape key.
Adds an event listener to call closeModal() when Escape key is pressed.
This commit is contained in:
@ -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',
|
||||
|
Reference in New Issue
Block a user