]> source.dussan.org Git - redmine.git/commitdiff
Fix that drag and drop objects from Outlook to Redmine deletes them (#32656).
authorGo MAEDA <maeda@farend.jp>
Mon, 9 Mar 2020 10:49:12 +0000 (10:49 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 9 Mar 2020 10:49:12 +0000 (10:49 +0000)
Patch by Yuichi HARADA.

git-svn-id: http://svn.redmine.org/redmine/trunk@19566 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index 61803a6b1a07a1b20599ae35ce41b0b7c8934af0..402cfa53fbec6b70609949167fe79b949f35354b 100644 (file)
@@ -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() {