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

VNode on handlers are not cleaned up after re-renders #808

Closed
logaretm opened this issue Mar 7, 2020 · 0 comments · Fixed by #809
Closed

VNode on handlers are not cleaned up after re-renders #808

logaretm opened this issue Mar 7, 2020 · 0 comments · Fixed by #809

Comments

@logaretm
Copy link

logaretm commented Mar 7, 2020

Version

3.0.0-alpha.8

Reproduction link

https://github.com/logaretm/vue-3-events-not-cleaned-up

Steps to reproduce

  • Clone the repo and serve the app.
  • Click on the button that changes the currently applied event.
  • Interact with the input and notice the handler emitting for both events after re-rendering it with both events at least once.
  • Notice in Chrome-Dev tools, in the element's listeners pane, both event listeners exist on the element.

What is expected?

The change handler should be cleaned up after switching it for the input event, the other way around is also true.

What is actually happening?

The events applied on the input doesn't seem to be cleaned up properly for previous renders.

https://github.com/logaretm/vue-3-events-not-cleaned-up/tree/contrib/vue-next-vnode-on-props-not-updating


I'm working on the support for vee-validate and this issue is currently blocking the "interaction mode" feature which switches the validation event based on the field validation state.

Using the chrome dev-tools, its apparant the listeners are not removed once they are added on the VNode.

This issue also is reproducable on alpha.8

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant