Disable drag and drop if it's not a file attachment
This commit is contained in:
parent
fba8e8d479
commit
621883a0ce
1 changed files with 18 additions and 0 deletions
|
@ -14,6 +14,24 @@
|
|||
(async function() {
|
||||
'use strict';
|
||||
|
||||
// Globally disable drag and drop
|
||||
document.body.addEventListener(
|
||||
'dragover',
|
||||
e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
},
|
||||
false
|
||||
);
|
||||
document.body.addEventListener(
|
||||
'drop',
|
||||
e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
// Load these images now to ensure that they don't flicker on first use
|
||||
const images = [];
|
||||
function preload(list) {
|
||||
|
|
Loading…
Reference in a new issue