Browse Source
Merge pull request #48632 from nextcloud/artonge/fix/file_list_jump_on_viewer_close
pull/48725/head
John Molakvoæ
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
8 additions and
3 deletions
-
apps/files/src/components/FilesListVirtual.vue
-
dist/files-main.js
-
dist/files-main.js.map
|
|
|
@ -252,6 +252,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')) |
|
|
|
|