diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 8c7844383..e33d7dcf4 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -644,7 +644,10 @@ if (screen_width <= 768) { if (object) { object.addEventListener('shown.bs.modal', function (e) { - location.hash = `m-${e.target.id}`; + if (location.hash) + location.replace(`${location.href.split('#')[0]}#m-${e.target.id}`); + else + location.hash = `m-${e.target.id}`; }); object.addEventListener('hide.bs.modal', function (e) {