timelines: workaround to a bug moves the panels

This commit is contained in:
thislight 2024-08-05 15:11:22 +08:00
parent cd02dc2053
commit f06a7a6da1
No known key found for this signature in database
GPG key ID: A50F9451AC56A63E

View file

@ -229,7 +229,7 @@ const Home: ParentComponent = (props) => {
const onTabClick = (idx: number) => { const onTabClick = (idx: number) => {
const items = panelList.querySelectorAll(".tab-panel"); const items = panelList.querySelectorAll(".tab-panel");
if (items.length > idx) { if (items.length > idx) {
items.item(idx).scrollIntoView({ block: "nearest", behavior: "smooth" }); items.item(idx).scrollIntoView({ block: "start", behavior: "smooth" });
} }
}; };