diff --git a/files/assets/js/comments+submission_listing.js b/files/assets/js/comments+submission_listing.js
index 0060df761..ebd21895e 100644
--- a/files/assets/js/comments+submission_listing.js
+++ b/files/assets/js/comments+submission_listing.js
@@ -14,8 +14,12 @@ function expandDesktopImage(image) {
document.getElementById("desktop-expanded-image").src = image.replace("200w_d.webp", "giphy.webp");
document.getElementById("desktop-expanded-image-link").href = image;
document.getElementById("desktop-expanded-image-wrap-link").href=image;
+ history.pushState(null, null, '#modal');
};
+document.getElementById('expandImageModal').addEventListener('hidden.bs.modal', function (event) {
+ window.location.hash = "";
+});
function popovertrigger() {
const popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 1f6226b32..f74b67cdf 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -857,7 +857,7 @@
{% include "expanded_image_modal.html" %}
-
+
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html
index 2e536e49b..83bace10a 100644
--- a/files/templates/submission_listing.html
+++ b/files/templates/submission_listing.html
@@ -698,5 +698,5 @@
-
+
\ No newline at end of file