vue-router icon indicating copy to clipboard operation
vue-router copied to clipboard

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

Open zengguirong opened this issue 1 year ago • 1 comments

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 avatar Jan 26 '23 13:01 zengguirong

Hello is it possible to work on this issue?

Robert-Kovalcuk avatar Oct 03 '23 11:10 Robert-Kovalcuk