forked from MarseyWorld/MarseyWorld
try smth to fix edge case jumps
parent
64d5687cc3
commit
3165489f58
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue