diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 469174f9b..b92ea60bf 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -604,7 +604,11 @@ if (screen_width <= 768) { }); addEventListener('hashchange', function () { - if(location.hash != "#modal") { + if (location.hash == "#modal") { + const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) + if (!curr_modal) history.back(); + } + else { const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) if (curr_modal) curr_modal.hide() }