]> source.dussan.org Git - redmine.git/commitdiff
Merged r21540 to 4.2-stable (#36817).
authorMarius Balteanu <marius.balteanu@zitec.com>
Thu, 28 Apr 2022 05:37:20 +0000 (05:37 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Thu, 28 Apr 2022 05:37:20 +0000 (05:37 +0000)
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21545 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index 839b4c776377d804f82e6aadbe2cc746d4f958be..de043815a1bcc4cc353cacc8a8055745d23a54f9 100644 (file)
@@ -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);
     }