Skip to content

Commit

Permalink
Exit download modal on pressing escape key.
Browse files Browse the repository at this point in the history
Adds an event listener to call closeModal() when Escape key is pressed.
  • Loading branch information
juuz0 committed Jul 20, 2022
1 parent 88c25b3 commit d0adb4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions static/skin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ R"EXPECTEDRESULT( src="/ROOT/skin/jquery-ui/external/jquery/jquery.js?cache
src: url("/ROOT/skin/fonts/Roboto.ttf?cacheid=84d10248") format("truetype");
<script src="/ROOT/skin/isotope.pkgd.min.js?cacheid=2e48d392" defer></script>
<script src="/ROOT/skin/iso6391To3.js?cacheid=ecde2bb3"></script>
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=ce2c8253" defer></script>
<script type="text/javascript" src="/ROOT/skin/index.js?cacheid=a0307d03" defer></script>
)EXPECTEDRESULT"
},
{
Expand Down

0 comments on commit d0adb4e

Please sign in to comment.