prevent drop actions when a dialog is open. fixes #107

This commit is contained in:
Stewart Allen 2021-02-24 12:28:17 -05:00
commit c628383a10

View file

@ -1270,6 +1270,12 @@
function dragOverHandler(evt) {
evt.stopPropagation();
evt.preventDefault();
// prevent drop actions when a dialog is open
if (API.modal.visible()) {
return;
}
evt.dataTransfer.dropEffect = 'copy';
let oldcolor = SPACE.platform.setColor(0x00ff00);
if (oldcolor !== 0x00ff00) platformColor = oldcolor;
@ -1283,6 +1289,11 @@
evt.stopPropagation();
evt.preventDefault();
// prevent drop actions when a dialog is open
if (API.modal.visible()) {
return;
}
SPACE.platform.setColor(platformColor);
let files = evt.dataTransfer.files;