Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove forced paint #2623

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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