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