Skip to content

Disable programmatic scrolling for anchored entries#2672

Merged
simon04 merged 1 commit intofreeCodeCamp:mainfrom
spamguy:2671
Apr 12, 2026
Merged

Disable programmatic scrolling for anchored entries#2672
simon04 merged 1 commit intofreeCodeCamp:mainfrom
spamguy:2671

Conversation

@spamguy
Copy link
Copy Markdown
Contributor

@spamguy spamguy commented Apr 1, 2026

This fixes a breakage caused by PR #2667 in which all route visits with no cached scroll position reset to the top. Anchored entries rely on the href's anchor to set scroll position and don't use cache; thus, all anchored entries scroll to the top.

nim's HTML cleaner was also updated to remove 'Source'/'Edit' links.

Fixes #2671 .

@spamguy spamguy requested a review from a team as a code owner April 1, 2026 20:07
@spamguy spamguy changed the title Disable scrolling for anchored entries Disable programmatic scrolling for anchored entries Apr 1, 2026
@Neonit
Copy link
Copy Markdown

Neonit commented Apr 8, 2026

Please merge soon. Bug is definitely a major one.

@xoism
Copy link
Copy Markdown

xoism commented Apr 8, 2026

I second Neonit's request. This bug makes devdocs basically useless the way I work.

@themadsens
Copy link
Copy Markdown

Does anyone know how to deploy this PR? Please :-)
If at all possible given the way DevDocs work?

@Neonit
Copy link
Copy Markdown

Neonit commented Apr 9, 2026

A workaround for me (using desktop Firefox) is re-submitting the URL (does not reload the page), if a click on an entry in the left column doesn't beam me to the anchor. Shortcut: CTRL + L, ENTER. (F5 also does the job, but it reloads the page and takes a lot longer)

@spamguy
Copy link
Copy Markdown
Contributor Author

spamguy commented Apr 10, 2026

Does anyone know how to deploy this PR? Please :-) If at all possible given the way DevDocs work?

AFAIK @simon04 is the primary admin that can approve, merge, and deploy.

@themadsens
Copy link
Copy Markdown

themadsens commented Apr 12, 2026

And replying to myself. When using as a chrome app that has no address line for Ctrl-L.
I have found that very other link fails, but it has to be a new one. So when a search result fails:

  • Arrow down + enter: This one now opens
  • Arrow down + enter: This one now fails
  • Arrow up X 2 + enter: The intended target now opens

Copy link
Copy Markdown
Contributor

@simon04 simon04 left a comment

Choose a reason for hiding this comment

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

Thank you!

@simon04 simon04 merged commit b67fe09 into freeCodeCamp:main Apr 12, 2026
2 checks passed
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.

Broken Link Navigation in Nim and Nim 1

5 participants