From: Go MAEDA Date: Mon, 9 Mar 2020 10:49:12 +0000 (+0000) Subject: Fix that drag and drop objects from Outlook to Redmine deletes them (#32656). X-Git-Tag: 4.2.0~1165 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=852290edb01a5193d0d638007bfd48ef5b8a5c14;p=redmine.git Fix that drag and drop objects from Outlook to Redmine deletes them (#32656). Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@19566 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 61803a6b1..402cfa53f 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -185,6 +185,7 @@ handleFileDropEvent.target = ''; function dragOverHandler(e) { $(this).addClass('fileover'); blockEventPropagation(e); + e.dataTransfer.dropEffect = 'copy'; } function dragOutHandler(e) { @@ -195,6 +196,7 @@ function dragOutHandler(e) { function setupFileDrop() { if (window.File && window.FileList && window.ProgressEvent && window.FormData) { + $.event.fixHooks.dragover = { props: [ 'dataTransfer' ] }; $.event.fixHooks.drop = { props: [ 'dataTransfer' ] }; $('form div.box:not(.filedroplistner)').has('input:file.filedrop').each(function() {