1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 19:47:14 +00:00

Use closest form when copy image from clipboard (#36817).

Patch by Yazan Al aeddin.


git-svn-id: https://svn.redmine.org/redmine/trunk@21540 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu 2022-04-27 20:40:45 +00:00
parent d4874f303e
commit 9243a5ffaa

View 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);
}