Reject drag and drop events

This commit is contained in:
Mo Bitar
2019-04-11 10:22:50 -05:00
parent 6835331664
commit 372c6c3a7a

View File

@@ -285,9 +285,24 @@ angular.module('app')
});
}
/*
Disable dragging and dropping of files into main SN interface.
both 'dragover' and 'drop' are required to prevent dropping of files.
This will not prevent extensions from receiving drop events.
*/
window.addEventListener('dragover', (event) => {
event.preventDefault();
}, false)
window.addEventListener('drop', (event) => {
event.preventDefault();
alert("Please use FileSafe to attach images and files. Learn more at standardnotes.org/filesafe.")
}, false)
// Handle Auto Sign In From URL
/*
Handle Auto Sign In From URL
*/
function urlParam(key) {
return $location.search()[key];