aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/alps/assets/attachments.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/alps/assets/attachments.js b/themes/alps/assets/attachments.js
index 1f02ab5..e519c29 100644
--- a/themes/alps/assets/attachments.js
+++ b/themes/alps/assets/attachments.js
@@ -16,6 +16,10 @@ attachmentsInput.addEventListener("input", ev => {
}
});
+window.addEventListener("dragenter", dragNOP);
+window.addEventListener("dragleave", dragNOP);
+window.addEventListener("dragover", dragNOP);
+
window.addEventListener("drop", ev => {
ev.preventDefault();
const files = ev.dataTransfer.files;
@@ -24,6 +28,11 @@ window.addEventListener("drop", ev => {
}
});
+function dragNOP(e) {
+ e.stopPropagation();
+ e.preventDefault();
+}
+
const sendButton = document.getElementById("send-button"),
saveButton = document.getElementById("save-button");