Merge branch 'dev' into text-drag-fix

This commit is contained in:
AUTOMATIC1111 2023-05-22 07:15:34 +03:00 committed by GitHub
commit 8137bdba61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
156 changed files with 5061 additions and 3661 deletions

View file

@ -1,4 +1,4 @@
window.onload = (function(){
window.onload = (function() {
window.addEventListener('drop', e => {
const target = e.composedPath()[0];
if (e.dataTransfer.files.length == 0 || target.placeholder.indexOf("Prompt") == -1) return;
@ -10,7 +10,7 @@ window.onload = (function(){
const imgParent = gradioApp().getElementById(prompt_target);
const files = e.dataTransfer.files;
const fileInput = imgParent.querySelector('input[type="file"]');
if ( fileInput ) {
if (fileInput) {
fileInput.files = files;
fileInput.dispatchEvent(new Event('change'));
}