Skip to content

Commit

Permalink
Fermeture overlay media #313
Browse files Browse the repository at this point in the history
  • Loading branch information
haruka-7 committed May 25, 2019
1 parent db60431 commit 54674f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/admin/medias.php
Expand Up @@ -351,6 +351,7 @@

<script>

// zoombox
var all = document.querySelectorAll(".overlay");
var mbox = document.getElementById("modal__box");
var mb = document.getElementById("modal");
Expand All @@ -365,7 +366,9 @@
// validate if the press key is the escape key
if (event.code=="Escape" || event.key=="Escape" || event.keyCode==27) {
mbox.innerHTML = "";
mb.click();
if (mb.checked === true) {
mb.click();
}
}
});

Expand Down

0 comments on commit 54674f3

Please sign in to comment.