aboutsummaryrefslogtreecommitdiff
path: root/javascript/imageParams.js
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-05-21 18:17:32 -0600
committermissionfloyd <missionfloyd@users.noreply.github.com>2023-05-21 18:17:32 -0600
commita862428902c4aecde8852761c3a4d95c196885cb (patch)
tree2279f87f0c015356db85945d89bba8610fc01cf9 /javascript/imageParams.js
parent89f9faa63388756314e8a1d96cf86bf5e0663045 (diff)
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 64aee93b..ed0df939 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";