switch case for mailgoKeydown

This commit is contained in:
Matteo Manzinello 2019-05-12 13:13:51 +02:00
parent d00d0e7149
commit 5240720449
3 changed files with 17 additions and 5 deletions

8
dist/mailgo.js vendored
View File

@ -319,9 +319,15 @@ mailgoCheckRender = event => {
* function to manage the keydown event when the modal is showing * function to manage the keydown event when the modal is showing
*/ */
mailgoKeydown = event => { mailgoKeydown = event => {
if (event.keyCode === 27) { switch (event.keyCode) {
case 27:
// Escape
hideMailgo(); hideMailgo();
break;
default:
return;
} }
return;
}; };
// DOMContentLoaded -> mailgoInit (creates the modal) // DOMContentLoaded -> mailgoInit (creates the modal)

2
dist/mailgo.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -319,9 +319,15 @@ mailgoCheckRender = event => {
* function to manage the keydown event when the modal is showing * function to manage the keydown event when the modal is showing
*/ */
mailgoKeydown = event => { mailgoKeydown = event => {
if (event.keyCode === 27) { switch (event.keyCode) {
case 27:
// Escape
hideMailgo(); hideMailgo();
break;
default:
return;
} }
return;
}; };
// DOMContentLoaded -> mailgoInit (creates the modal) // DOMContentLoaded -> mailgoInit (creates the modal)