mirror of
https://github.com/nextcloud/server.git
synced 2026-06-19 21:49:43 -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> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
749b6f3f68
commit
f3dd25fa64
3 changed files with 8 additions and 3 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
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