fix reporting and giving awards on mobile

master
Aevann 2023-07-30 13:15:07 +03:00
parent c7f606baa9
commit 9d1de6ee5a
1 changed files with 10 additions and 8 deletions

View File

@ -586,15 +586,17 @@ function handleUploadProgress(e, upload_prog) {
if (screen_width <= 768) {
document.addEventListener('shown.bs.modal', () => {
location.hash = "modal";
});
if (expandImageModal) {
expandImageModal.addEventListener('shown.bs.modal', () => {
location.hash = "modal";
});
document.addEventListener('hidden.bs.modal', () => {
if(location.hash == "#modal") {
history.back();
}
});
expandImageModal.addEventListener('hidden.bs.modal', () => {
if(location.hash == "#modal") {
history.back();
}
});
}
window.addEventListener('hashchange', () => {
if(location.hash != "#modal") {