Skip to content

onBeforeRouteUpdate is not triggered when keep-alive component is enabled. #2601

@syenet

Description

@syenet

Reproduction

https://github.com/syenet/vue-test

Steps to reproduce the bug

  1. visit /a in browser to 'a' list page.
  2. in 'a' list page, click the link 'Go to /a/123' to visit detail page of 'a 123'.
  3. in 'a 123' detail page, click the link 'b/' to visit 'b' list page.
  4. in 'b' list page, click the link 'page=2'.
  5. note that onBeforeRouteUpdate is not triggered.
  6. now, if you visit '/a' again, the issue is gone, click 'page=2', onBeforeRouteUpdate will be triggered as expected from now on.
  7. now you can visit '/b' again, click 'page=2', onBeforeRouteUpdate will be triggered as well.

Expected behavior

at step 5, onBeforeRouteUpdate should be triggered.

Actual behavior

at step 5, onBeforeRouteUpdate is not triggered.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat:keep-aliveSpecific to using keep-alive🐞 bugthis isn't working as expected👍 contribution welcomeothers are welcome to implement/fix this

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions