Skip to content

fix: browser back navigation fails with hash URLs#17081

Merged
wackerow merged 1 commit into
ethereum:devfrom
minimalsm:fix/hash-navigation-back-button
Jan 15, 2026
Merged

fix: browser back navigation fails with hash URLs#17081
wackerow merged 1 commit into
ethereum:devfrom
minimalsm:fix/hash-navigation-back-button

Conversation

@minimalsm
Copy link
Copy Markdown
Contributor

Summary

Fixes browser back button navigation failing when returning to a page with a hash URL fragment. The issue occurred because hash links were rendered as plain <a> tags, causing the browser to interpret back navigation as a same-page scroll rather than a proper route change.

  • Changed hash links in BaseLink component to use I18nLink (Next.js router) instead of native <a> tags
  • Ensures browser history is properly managed by Next.js router
  • Back navigation now correctly triggers full route changes when the target URL contains a hash

Fixes #17080

Test plan

  • Navigate to /community/events
  • Click a TabNav anchor link (e.g., "Conferences") to scroll to that section
  • Click the "See all" button for meetups to navigate to /community/events/meetups/
  • Click the browser back button
  • Verify the page returns to /community/events and displays the main events page content

Hash links were rendered as plain <a> tags, which meant browser history
was managed natively. When navigating from a subpage back to a page with
a hash URL (e.g., /community/events#conferences), the browser interpreted
this as a same-page scroll rather than a route change, causing the UI to
stay on the wrong page.

Switching hash links to use I18nLink ensures the Next.js router properly
manages history, so back navigation triggers a full route change.

Fixes ethereum#17080
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 14, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit da43f1e
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6967e678efa5d700070e64b3
😎 Deploy Preview https://deploy-preview-17081.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 59 (🟢 up 7 from production)
Accessibility: 94 (no change from production)
Best Practices: 100 (🟢 up 1 from production)
SEO: 100 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@wackerow wackerow merged commit 618e759 into ethereum:dev Jan 15, 2026
7 checks passed
@wackerow wackerow mentioned this pull request Jan 23, 2026
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.

Browser back navigation fails when returning to pages with hash URLs

2 participants