timelines: workaround to a bug moves the panels

This commit is contained in:
thislight 2024-08-05 15:11:22 +08:00
parent bef75b8a8a
commit 91999a6303

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" });
} }
}; };