Skip to content

fix(history): add ignoreBlocker support to go method (#4867) #4872

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KSJ27
Copy link

@KSJ27 KSJ27 commented Aug 6, 2025

Description

Fixes GitHub issue #4867 - history.go does not respect ignoreBlocker option.

Currently, when using TanStack Router with BrowserHistory, the ignoreBlocker option works as expected for history.back and history.forward, but does not work for history.go. This means that navigation blockers are still triggered even when ignoreBlocker: true is passed to history.go.

Changes

Core Fix

  • packages/history/src/index.ts:
    • Add ignoreBlocker parameter to go method in createBrowserHistory
    • Update createHistory to pass ignoreBlocker to underlying go implementation
    • Ensure consistent behavior across back, forward, and go methods

Testing

  • packages/history/tests/ignoreBlocker.test.ts:
    • Test all navigation methods (back, forward, go) with ignoreBlocker option in createBrowserHistory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant