From f36336ea945397e503f511f57ee4a0a820563f31 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 11 Mar 2023 06:59:47 +0200 Subject: [PATCH] limit #modal to expanded images --- files/assets/js/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/assets/js/core.js b/files/assets/js/core.js index db1c51bdf..ae506c182 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -598,11 +598,11 @@ function handleUploadProgress(e, upload_prog) { } } -window.addEventListener('show.bs.modal', function () { +document.getElementById('expandImageModal').addEventListener('show.bs.modal', function () { location.hash = "modal"; }); -window.addEventListener('hide.bs.modal', function () { +document.getElementById('expandImageModal').addEventListener('hide.bs.modal', function () { if(location.hash == "#modal") { history.back(); }