Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gorgeous-pugs-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/starlight": patch
---

Fix an issue where the scrollbar was causing a forced paint halfway through page render
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fix an issue where the scrollbar was causing a forced paint halfway through page render
Fixes an issue where the scrollbar was causing a forced paint halfway through page render

Starlight and Astro prefer writing their changesets in a present tense verb.

4 changes: 2 additions & 2 deletions packages/starlight/components/SidebarPersister.astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ declare global {
<slot />

<script is:inline>
(() => {
requestAnimationFrame(() => {
const scroller = document.getElementById('starlight__sidebar');
if (!window._starlightScrollRestore || !scroller) return;
scroller.scrollTop = window._starlightScrollRestore;
delete window._starlightScrollRestore;
})();
});
</script>
</sl-sidebar-state-persist>

Expand Down
Loading