summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/javascripts/attachments.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index 76d75d6e2..b7c42aa8a 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -289,7 +289,8 @@ function copyImageFromClipboard(e) {
+ '-' + randomKey(5).toLocaleLowerCase()
+ '.' + file.name.split('.').pop();
- var inputEl = $('input:file.filedrop').first()
+ // get input file in the closest form
+ var inputEl = $(this).closest("form").find('input:file.filedrop');
handleFileDropEvent.target = e.target;
addFile(inputEl, new File([file], filename, { type: file.type }), true);
}