mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-05 03:32:37 +00:00
Merge branch 'dev' into text-drag-fix
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user