From 3b56b545574b3fbd32a5cbed9ee5aa55268e77ae Mon Sep 17 00:00:00 2001 From: Connum Date: Sun, 18 Sep 2022 11:42:05 +0200 Subject: [PATCH] fix pasting of images from the clipboard in img2img (fixes #645) --- javascript/dragdrop.js | 1 + 1 file changed, 1 insertion(+) diff --git a/javascript/dragdrop.js b/javascript/dragdrop.js index a3605bdc7..0dddea883 100644 --- a/javascript/dragdrop.js +++ b/javascript/dragdrop.js @@ -54,5 +54,6 @@ window.addEventListener('paste', e => { input.dispatchEvent(new Event('change')) }); [...gradioApp().querySelectorAll('[data-testid="image"]')] + .filter(imgWrap => !imgWrap.closest('.\\!hidden')) .forEach(imgWrap => dropReplaceImage( imgWrap, files )); });