Skip to content

Commit 474c27e

Browse files
bbagdelucis
andauthoredJan 6, 2025··
Add instant behavior to synced tab scrolling (#2747)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
1 parent 5b7f611 commit 474c27e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎.changeset/chilly-paws-smell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@astrojs/starlight": patch
3+
---
4+
5+
Ensures `<Tab>` component toggling is stable when smooth scrolling is enabled via custom CSS

‎packages/starlight/user-components/Tabs.astro

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ if (isSynced) {
224224
StarlightTabs.#syncTabs(this, newTab);
225225
window.scrollTo({
226226
top: window.scrollY + (this.getBoundingClientRect().top - previousTabsOffset),
227+
behavior: 'instant',
227228
});
228229
}
229230
}

0 commit comments

Comments
 (0)
Please sign in to comment.