Skip to content
Open
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
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/src/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export function SideNavLink(props) {
return;
}

link.scrollIntoView({block: 'start', behavior: 'smooth'});
link.scrollIntoView({block: 'start'});
Copy link
Member

Choose a reason for hiding this comment

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

I noticed that it scrolls even when you click on a link in the sidebar. For example scroll down and then click a link near the top, it will move when you click it. Maybe we should only do this on the initial page load?

Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand what you mean correctly, this should be fixed when using our shim here instead, as that implements the equivalent of scrollIntoViewIfNeeded.

}, [props.isSelected]);

return (
Expand Down
Loading