diff options
author | Johannes Zellner <johannes@cloudron.io> | 2018-05-18 21:10:01 +0200 |
---|---|---|
committer | Johannes Zellner <johannes@cloudron.io> | 2018-05-18 21:10:01 +0200 |
commit | 19efa5bcdb745205ef5a6812480890968a17d1a9 (patch) | |
tree | 571f5d62d2c704845f839c8635f9a259a404e4c2 /frontend | |
parent | 35355283872739fb9bd150cf42a40a1a23b1674d (diff) | |
download | Surfer-19efa5bcdb745205ef5a6812480890968a17d1a9.tar.gz Surfer-19efa5bcdb745205ef5a6812480890968a17d1a9.tar.zst Surfer-19efa5bcdb745205ef5a6812480890968a17d1a9.zip |
Set a drop zone effect to show the correct cursor
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/js/app.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/frontend/js/app.js b/frontend/js/app.js index 4cb57e3..b68b608 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js | |||
@@ -164,10 +164,13 @@ function uploadFiles(files) { | |||
164 | } | 164 | } |
165 | 165 | ||
166 | function dragOver(event) { | 166 | function dragOver(event) { |
167 | event.stopPropagation(); | ||
167 | event.preventDefault(); | 168 | event.preventDefault(); |
169 | event.dataTransfer.dropEffect = 'copy'; | ||
168 | } | 170 | } |
169 | 171 | ||
170 | function drop(event) { | 172 | function drop(event) { |
173 | event.stopPropagation(); | ||
171 | event.preventDefault(); | 174 | event.preventDefault(); |
172 | uploadFiles(event.dataTransfer.files || []); | 175 | uploadFiles(event.dataTransfer.files || []); |
173 | } | 176 | } |