From aa3bc864eeb75d0f81fdf2905ceed00fb01bb298 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Thu, 16 Mar 2023 00:32:10 +0100 Subject: [PATCH] Also fix clicks into the image --- ui/media/js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index 82d83799..53c3746b 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -318,9 +318,6 @@ function showImages(reqBody, res, outputContainer, livePreview) { imageElem.addEventListener('load', function() { imageItemElem.querySelector('.img_bottom_label').innerText = `${this.naturalWidth} x ${this.naturalHeight}` }) - imageElem.addEventListener('click', function() { - imageModal(this.src) - }) const imageInfo = imageItemElem.querySelector('.imgItemInfo') imageInfo.style.visibility = (livePreview ? 'hidden' : 'visible') @@ -330,6 +327,9 @@ function showImages(reqBody, res, outputContainer, livePreview) { imageExpandBtn.addEventListener('click', function() { imageModal(imageElem.src) }) + imageElem.addEventListener('click', function() { + imageModal(this.src) + }) const req = Object.assign({}, reqBody, { seed: result?.seed || reqBody.seed