diff --git a/.changeset/chilly-paws-smell.md b/.changeset/chilly-paws-smell.md new file mode 100644 index 00000000000..a7f3ea20b54 --- /dev/null +++ b/.changeset/chilly-paws-smell.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Ensures `` component toggling is stable when smooth scrolling is enabled via custom CSS diff --git a/packages/starlight/user-components/Tabs.astro b/packages/starlight/user-components/Tabs.astro index 4234eb0126a..257174e1dbe 100644 --- a/packages/starlight/user-components/Tabs.astro +++ b/packages/starlight/user-components/Tabs.astro @@ -224,6 +224,7 @@ if (isSynced) { StarlightTabs.#syncTabs(this, newTab); window.scrollTo({ top: window.scrollY + (this.getBoundingClientRect().top - previousTabsOffset), + behavior: 'instant', }); } }