Skip to content

Commit 03f3bd9

Browse files
artongebackportbot[bot]
authored andcommitted
fix(files): Do not jump to top when fileId is set to currentFolder
Fix #48545 Signed-off-by: Louis Chemineau <louis@chmn.me> [skip ci]
1 parent c5a15be commit 03f3bd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/files/src/components/FilesListVirtual.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ export default defineComponent({
252252
253253
scrollToFile(fileId: number|null, warn = true) {
254254
if (fileId) {
255+
// Do not uselessly scroll to the top of the list.
256+
if (fileId === this.currentFolder.fileid) {
257+
return
258+
}
259+
255260
const index = this.nodes.findIndex(node => node.fileid === fileId)
256261
if (warn && index === -1 && fileId !== this.currentFolder.fileid) {
257262
showError(this.t('files', 'File not found'))

0 commit comments

Comments
 (0)