Skip to content

Commit 0693bc5

Browse files
committed
Update filebrowser.js
1 parent 8ac1516 commit 0693bc5

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

filebrowser.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,11 +835,15 @@ async function renderSidebarHTML(pageNum = 1) {
835835

836836
sidebar.scrollTo(0, (sidebar.scrollHeight - sidebar.clientHeight - 54));
837837

838-
// don't override existing HTML items
839-
fileWrapper.innerHTML += out;
840-
841-
// scroll to end of additional page
842-
sidebar.scrollTo(0, (sidebar.scrollHeight - sidebar.clientHeight - 1));
838+
onNextFrame(() => {
839+
840+
// don't override existing HTML items
841+
fileWrapper.innerHTML += out;
842+
843+
// scroll to end of additional page
844+
sidebar.scrollTo(0, (sidebar.scrollHeight - sidebar.clientHeight - 1));
845+
846+
});
843847

844848
}
845849

0 commit comments

Comments
 (0)