Added tab scroll position memory.

- Second attempt. Made tab content scroll instead of tab contents container.
This commit is contained in:
Christian Bastian
2024-07-26 22:16:39 -04:00
parent 0975f9713d
commit 9c1ac43870
2 changed files with 4 additions and 0 deletions

View File

@@ -246,12 +246,14 @@
height: 100%;
width: auto;
overflow-x: auto;
overflow-y: hidden;
}
.model-manager .model-manager-body .tab-content {
display: flex;
flex-direction: column;
height: 100%;
overflow-y: auto;
}
/* model info view */

View File

@@ -445,9 +445,11 @@ function GenerateTabGroup(tabData) {
});
tabContents.forEach((tabContent) => {
if (name === tabContent.getAttribute("data-name")) {
tabContent.scrollTop = tabContent.dataset["scrollTop"] ?? 0;
tabContent.style.display = "";
}
else {
tabContent.dataset["scrollTop"] = tabContent.scrollTop;
tabContent.style.display = "none";
}
});