prevent drop actions when a dialog is open. fixes #107
This commit is contained in:
parent
ff7181f55f
commit
c628383a10
1 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue