mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 10:10:49 -04:00
fix(files): Do not jump to top when fileId is set to currentFolder
Fix https://github.com/nextcloud/server/issues/48545 Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
11f0b0f817
commit
7b27d052ad
3 changed files with 8 additions and 3 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue