Skip to content

route is changed when history.pushState() and history.back() manually #956

@Senasiko

Description

@Senasiko

Version

4.0.8

Reproduction link

https://jsfiddle.net/4um9abzg/4/

Steps to reproduce

  1. click pushState
  2. click back
  3. look at console

the callback of router.beforeEach is triggered.

but it won't be triggered in vue@2.x and vue-router@3.x

vue-route@3.x link: https://codesandbox.io/s/magical-leaf-mxd4l

What is expected?

the callback of router.beforeEach will not be triggered.

What is actually happening?

the callback of router.beforeEach is triggered.

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