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

Add hooks for activated / deactivated #27

Open
natemate90 opened this issue Jul 22, 2020 · 2 comments
Open

Add hooks for activated / deactivated #27

natemate90 opened this issue Jul 22, 2020 · 2 comments

Comments

@natemate90
Copy link

natemate90 commented Jul 22, 2020

I'm getting the following error:
Uncaught TypeError: Cannot read property 'height' of null at VueComponent.updateInViewport (vendors-9734db2b5db5665331401bfd393f02d0.js:101585)

When using <keep-alive> to cache the <router-view> component, I believe there needs to be activated / deactivated hooks that make sure that the inViewportHandlers are added or removed

@SageSanyue
Copy link

Me too! Same error, but I can't delete 'keep-alive: true'.
So it displays error like:

index.js?fd90:204 Uncaught TypeError: Cannot read properties of null (reading 'bottom')
    at VueComponent.updateInViewport (index.js?fd90:204)

@BenjaminNolan
Copy link
Contributor

BenjaminNolan commented Mar 21, 2023

@natemate90 @SageSanyue A PR which removes the listeners when the dom element is removed was merged in December, which I think should fix these issues. Might be worth re-checking with 3.1.0. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants