fix pasting of images from the clipboard in img2img (fixes #645)

This commit is contained in:
Connum 2022-09-18 11:42:05 +02:00
parent 3f29aa791b
commit 3b56b54557
1 changed files with 1 additions and 0 deletions

View File

@ -54,5 +54,6 @@ window.addEventListener('paste', e => {
input.dispatchEvent(new Event('change')) input.dispatchEvent(new Event('change'))
}); });
[...gradioApp().querySelectorAll('[data-testid="image"]')] [...gradioApp().querySelectorAll('[data-testid="image"]')]
.filter(imgWrap => !imgWrap.closest('.\\!hidden'))
.forEach(imgWrap => dropReplaceImage( imgWrap, files )); .forEach(imgWrap => dropReplaceImage( imgWrap, files ));
}); });