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

Vue framework examples use wrong lifecycle hook to destroy foundation classes #416

Closed
pgbross opened this issue Mar 21, 2017 · 0 comments
Closed

Comments

@pgbross
Copy link
Contributor

pgbross commented Mar 21, 2017

What MDC-Web Version are you using?

0.7.0

What browser(s) is this bug affecting?

Version 58.0.3029.19 beta (64-bit)

What OS are you using?

Fedora 25 (Linux p5q 4.9.13-201.fc25.x86_64)

What are the steps to reproduce the bug?

  1. run the vue framework demo server
  2. go to localhost:8080
  3. set breakpoint on component's beforeUnmount (e.g. IconToggle.vue)
  4. Cause component to be replaced (e.g. make a change to IconToggle.vue code such as add a console.log() message)
  5. Observe the beforeUnmount() method is not called.

What is the expected behavior?

The correct lifecycle method is beforeDestroy(), see https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram

What is the actual behavior?

The underlying foundation class is never destroyed.

Any other information you believe would be useful?

The framework example is doesn't demonstrate the problem easily as none of the components used are normally destroyed by exercising the page. Adding a checkbox and using v-if directive to control the presence of a component, such as the icon-toggle, makes it simple to observe the correct beforeDestroy() method being called.

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

1 participant