diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-04-02 11:28:59 +0200 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-04-04 13:33:10 +0200 |
commit | 38c7ca0d4dec36fb10736afa7c5947939f831fa6 (patch) | |
tree | b5836b011a87115c0046870cb2be2a09e08776ff /apps/files/src/components/DragAndDropNotice.vue | |
parent | aacc7abccc8101e0603ba9664ca513563b9b3fd6 (diff) | |
download | nextcloud-server-38c7ca0d4dec36fb10736afa7c5947939f831fa6.tar.gz nextcloud-server-38c7ca0d4dec36fb10736afa7c5947939f831fa6.zip |
chore: add drag and drop recursion and FilesystemAPI testing
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/components/DragAndDropNotice.vue')
-rw-r--r-- | apps/files/src/components/DragAndDropNotice.vue | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/src/components/DragAndDropNotice.vue b/apps/files/src/components/DragAndDropNotice.vue index d591f6ee934..c036c86fb64 100644 --- a/apps/files/src/components/DragAndDropNotice.vue +++ b/apps/files/src/components/DragAndDropNotice.vue @@ -180,7 +180,7 @@ export default defineComponent({ // If another button is pressed, cancel it. This // allows cancelling the drag with the right click. - if (event.button !== 0) { + if (event.button) { return } @@ -192,9 +192,12 @@ export default defineComponent({ // Scroll to last successful upload in current directory if terminated const lastUpload = uploads.findLast((upload) => upload.status !== UploadStatus.FAILED && !upload.file.webkitRelativePath.includes('/') - && upload.response?.headers?.['oc-fileid']) + && upload.response?.headers?.['oc-fileid'] + // Only use the last ID if it's in the current folder + && upload.source.replace(folder.source, '').split('/').length === 2) if (lastUpload !== undefined) { + logger.debug('Scrolling to last upload in current folder', { lastUpload }) this.$router.push({ ...this.$route, params: { |