1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Ensure Directory Browser Scrolls to Top on Selection

When a user chooses a directory using the directory browser, it previously stayed at its scroll location. Now it moves back to the top, which is expected behaviour.
This commit is contained in:
ViXXoR 2019-01-10 08:22:36 -05:00
parent 1b9098d6c6
commit 10d5c28876

View file

@ -18,6 +18,7 @@ define(["loading", "dialogHelper", "dom", "listViewStyle", "emby-input", "emby-b
"Network" === path ? promises.push(ApiClient.getNetworkDevices()) : path ? (promises.push(ApiClient.getDirectoryContents(path, fileOptions)), promises.push(ApiClient.getParentPath(path))) : promises.push(ApiClient.getDrives()), Promise.all(promises).then(function(responses) {
var folders = responses[0],
parentPath = responses[1] || "";
page.querySelector(".results").scrollTop = 0;
page.querySelector("#txtDirectoryPickerPath").value = path || "";
var html = "";
path && (html += getItem("lnkPath lnkDirectory", "", parentPath, "..."));