Skip to content

Comments

ENG-6307: Only scroll to a link in the sidebar#1432

Merged
Alek99 merged 1 commit intomainfrom
masenf/scroll-to-sidebar-link
Jun 16, 2025
Merged

ENG-6307: Only scroll to a link in the sidebar#1432
Alek99 merged 1 commit intomainfrom
masenf/scroll-to-sidebar-link

Conversation

@masenf
Copy link
Collaborator

@masenf masenf commented Jun 16, 2025

If the page loads slowly, then the js snippet might find a matching link in the footer and scroll to the bottom of the page instead of scrolling to expose the sidebar link.

Fixup from #1423

If the page loads slowly, then the js snippet might find a matching link in the
footer and scroll to the bottom of the page instead of scrolling to expose the
sidebar link.
@linear
Copy link

linear bot commented Jun 16, 2025

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed sidebar scrolling behavior to prevent unintended scrolling to footer links during slow page loads by scoping the active link search to within the sidebar container only.

  • Modified pcweb/components/docpage/sidebar/sidebar.py to add a specific container ID for the sidebar and restrict link matching to that container, preventing accidental scrolling to footer links

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@Alek99 Alek99 merged commit 87061a4 into main Jun 16, 2025
9 checks passed
@Alek99 Alek99 deleted the masenf/scroll-to-sidebar-link branch June 16, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants