Skip to content

"onBeforeRouteLeave" guard is not removed after switching to another view when using keep-alive and composables api #3826

Open
@zengguirong

Description

@zengguirong

Version

3.6.5

Reproduction link

github.com

Steps to reproduce

  1. Clone the Github repo
  2. Run 'npm install'
  3. Run 'npm run dev' and open the broswer
  4. Click the first link
  5. Click the second link
  6. Click the first link one more time

What is expected?

The window alert "onBeforeRouteLeave" only once after step 5

What is actually happening?

  1. The window alert "onBeforeRouteLeave" after step 5
  2. The window alert "onBeforeRouteLeave" after step 6

This bug only appears when using keep-alive and composables api.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions