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%;
|
height: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.model-manager .model-manager-body .tab-content {
|
.model-manager .model-manager-body .tab-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* model info view */
|
/* model info view */
|
||||||
|
|||||||
@@ -445,9 +445,11 @@ function GenerateTabGroup(tabData) {
|
|||||||
});
|
});
|
||||||
tabContents.forEach((tabContent) => {
|
tabContents.forEach((tabContent) => {
|
||||||
if (name === tabContent.getAttribute("data-name")) {
|
if (name === tabContent.getAttribute("data-name")) {
|
||||||
|
tabContent.scrollTop = tabContent.dataset["scrollTop"] ?? 0;
|
||||||
tabContent.style.display = "";
|
tabContent.style.display = "";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
tabContent.dataset["scrollTop"] = tabContent.scrollTop;
|
||||||
tabContent.style.display = "none";
|
tabContent.style.display = "none";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user