diff --git a/files/assets/js/core.js b/files/assets/js/core.js index c161798c1..2afe22599 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -586,15 +586,15 @@ function handleUploadProgress(e, upload_prog) { if (screen_width <= 768) { - addEventListener('shown.bs.modal', function () { - location.hash = "modal"; - }); - addEventListener('hidden.bs.modal', function () { if(location.hash == "#modal") { history.back(); } }); + + addEventListener('shown.bs.modal', function () { + location.hash = "modal"; + }); addEventListener('hashchange', function () { if(location.hash != "#modal") {