]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
Set a drop zone effect to show the correct cursor
authorJohannes Zellner <johannes@cloudron.io>
Fri, 18 May 2018 19:10:01 +0000 (21:10 +0200)
committerJohannes Zellner <johannes@cloudron.io>
Fri, 18 May 2018 19:10:01 +0000 (21:10 +0200)
frontend/js/app.js

index 4cb57e3b1b35163d1c72c04cd5e07e78d08d75ff..b68b6089cf5963831350d3ad0aa24179c2a1e7d7 100644 (file)
@@ -164,10 +164,13 @@ function uploadFiles(files) {
 }
 
 function dragOver(event) {
+    event.stopPropagation();
     event.preventDefault();
+    event.dataTransfer.dropEffect = 'copy';
 }
 
 function drop(event) {
+    event.stopPropagation();
     event.preventDefault();
     uploadFiles(event.dataTransfer.files || []);
 }