aboutsummaryrefslogtreecommitdiff
path: root/javascript/imageParams.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-22 07:15:44 +0300
committerGitHub <noreply@github.com>2023-05-22 07:15:44 +0300
commitee2f4fb92da56ce5d5d06a78332e7f7da56ee2ae (patch)
treec5a02e9f9ae57c9f0ff8499379c6cc61a97c094e /javascript/imageParams.js
parent3366e494a1147e570d8527eea19da88edb3a1e0c (diff)
parent8137bdba61fd57cc1ddae801f6080d51e13d70c5 (diff)
Merge pull request #10615 from missionfloyd/text-drag-fix
Fix dragging text to prompt
Diffstat (limited to 'javascript/imageParams.js')
-rw-r--r--javascript/imageParams.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript/imageParams.js b/javascript/imageParams.js
index 057e2d39..0cdd717a 100644
--- a/javascript/imageParams.js
+++ b/javascript/imageParams.js
@@ -1,7 +1,7 @@
window.onload = (function() {
window.addEventListener('drop', e => {
const target = e.composedPath()[0];
- if (target.placeholder.indexOf("Prompt") == -1) return;
+ if (e.dataTransfer.files.length == 0 || target.placeholder.indexOf("Prompt") == -1) return;
let prompt_target = get_tab_index('tabs') == 1 ? "img2img_prompt_image" : "txt2img_prompt_image";