Skip to content

calling next(false); unexpectedly clears forward history #2821

Closed
@pretzelhammer

Description

@pretzelhammer

Version

3.0.1

Reproduction link

https://codesandbox.io/s/7l33b

Steps to reproduce

  • Click through the router-links on the page to get some history (a prompt will pop up on every navigation, click "OK")
  • Go back a few times (using either the browser back button or the HTML "go back" button)
  • After you are somewhere in the middle of your history/navigation stack, go forward or back (again using either the browser or HTML buttons) but this time when the prompt pops up asking you if you want to proceed, click "Cancel"
  • All of your forward history is gone

What is expected?

I don't expect all of the forward history to disappear just because a component cancelled navigation, i.e. next(false);

What is actually happening?

All of the forward history is disappearing after a component cancels navigation, i.e. next(false);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions