Added tab scroll position memory.
- Second attempt. Made tab content scroll instead of tab contents container.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user