Merge pull request #648 from 48design/fix-img2img-paste

fix pasting of images from the clipboard in img2img (fixes #645)
This commit is contained in:
AUTOMATIC1111 2022-09-18 12:54:57 +03:00 committed by GitHub
commit 83a65919bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 ));
}); });