diff --git a/client/src/composables/useFileDrop.js b/client/src/composables/useFileDrop.js index 3c8b6394d2d..76e8ed1609f 100644 --- a/client/src/composables/useFileDrop.js +++ b/client/src/composables/useFileDrop.js @@ -39,13 +39,15 @@ export function useFileDrop(dropZone, onDrop, solo) { document.body, "drop", (event) => { - if (!dragBlocked.value && isFileOverDocument.value) { + if (!dragBlocked.value) { // prevent the browser from opening the file event.preventDefault(); - isFileOverDocument.value = false; - unref(onDrop)(event); + if (isFileOverDropZone.value && isFileOverDocument.value) { + unref(onDrop)(event); + } } + isFileOverDocument.value = false; dragBlocked.value = false; }, true