aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-10-09 18:23:58 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2024-10-29 14:39:50 +0000
commitf3dd25fa642e958fbafeddefdbec48f7c7d6ea83 (patch)
treef151e6a219dd0d2d7321170d5db0b8e9f0fb8c63 /apps/files
parent749b6f3f68f5118e065939e13dfe72c49b179f94 (diff)
downloadnextcloud-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.vue5
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'))