Skip to content
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

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

Open
zengguirong opened this issue Jan 26, 2023 · 1 comment · May be fixed by #3875
Labels

Comments

@zengguirong
Copy link

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.

@zengguirong zengguirong changed the title "onBeforeRouteLeave" guard not remove after switching to another view when using keep-alive and composables api "onBeforeRouteLeave" guard is not removed after switching to another view when using keep-alive and composables api Jan 26, 2023
@posva posva added the bug label Jan 31, 2023
@Robert-Kovalcuk
Copy link

Hello is it possible to work on this issue?

wynn719 added a commit to wynn719/vue-router that referenced this issue Nov 16, 2023
wynn719 added a commit to wynn719/vue-router that referenced this issue Nov 16, 2023
@posva posva linked a pull request Nov 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants