Close all modals with Esc key

This commit is contained in:
Mylène Bressan 2015-10-24 23:48:21 +02:00
parent 0cb9771df0
commit 3b884712a6

View File

@ -140,7 +140,10 @@ function reOrganizeTemplates() { // for nin's templating
// Close new post prompt with esc key
$(document).keyup(function(e) {
if (e.keyCode == 27) {$('.mini-profile .post-area').removeClass('display');}
if (e.keyCode == 27) {
$('.mini-profile .post-area').removeClass('display');
closeModal();
}
});
function reAppendModules() { // avoid w1200 things
@ -197,4 +200,4 @@ function openModal(modal) {
}
}
return modal;
}
}