diff options
author | Louis Chemineau <louis@chmn.me> | 2024-10-09 18:23:58 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2024-10-29 14:39:50 +0000 |
commit | f3dd25fa642e958fbafeddefdbec48f7c7d6ea83 (patch) | |
tree | f151e6a219dd0d2d7321170d5db0b8e9f0fb8c63 /apps/files | |
parent | 749b6f3f68f5118e065939e13dfe72c49b179f94 (diff) | |
download | nextcloud-server-backport/48632/stable29.tar.gz nextcloud-server-backport/48632/stable29.zip |
fix(files): Do not jump to top when fileId is set to currentFolderbackport/48632/stable29
Fix https://github.com/nextcloud/server/issues/48545
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/components/FilesListVirtual.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue index 4f3bdec9fd9..303d57e5326 100644 --- a/apps/files/src/components/FilesListVirtual.vue +++ b/apps/files/src/components/FilesListVirtual.vue @@ -268,6 +268,11 @@ export default defineComponent({ scrollToFile(fileId: number|null, warn = true) { if (fileId) { + // Do not uselessly scroll to the top of the list. + if (fileId === this.currentFolder.fileid) { + return + } + const index = this.nodes.findIndex(node => node.fileid === fileId) if (warn && index === -1 && fileId !== this.currentFolder.fileid) { showError(this.t('files', 'File not found')) |