From 841933438e70bc45f6346e9582da773cb6b2f475 Mon Sep 17 00:00:00 2001
From: Tamara Steinwender <tamara.steinwender@tugraz.at>
Date: Tue, 22 Dec 2020 14:40:04 +0100
Subject: [PATCH] Scroll to top if new directory is loaded in
 nextcloudfilepicker

---
 packages/file-handling/src/dbp-nextcloud-file-picker.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/file-handling/src/dbp-nextcloud-file-picker.js b/packages/file-handling/src/dbp-nextcloud-file-picker.js
index 201ffe9f..73fdf9ba 100644
--- a/packages/file-handling/src/dbp-nextcloud-file-picker.js
+++ b/packages/file-handling/src/dbp-nextcloud-file-picker.js
@@ -360,6 +360,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
                 this.statusText = "";
                 this.tabulatorTable.setData(contents.data);
                 this.isPickerActive = true;
+                this._(".nextcloud-content").scrollTop = 0;
                 if (!this.activeDirectoryRights.includes("CK") && !this.activeDirectoryRights.includes("NV")) {
                     this._("#download-button").setAttribute("disabled", "true");
                 }
-- 
GitLab