-
Notifications
You must be signed in to change notification settings - Fork 242
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
Error in directive clipboard unbind hook #75
Comments
FWIW, I have the same issue. It doesn't seem to matter how the button is removed from the DOM (v-if or a route change), it always results in the same error. |
+1, I cannot seem to figure out root cause but I am now gutting this package from my project. |
https://github.com/Inndy/vue-clipboard2#sample-2 |
My team can confirm this is still an issue when the component is destroyed. You get a slightly better log from firefox: 'Error in directive clipboard unbind hook: "TypeError: el._vClipboard is undefined"'. It would be nice to have the directives working but we can confirm sample2 also works. |
+1 same problem here |
For what I checked, when the component is loaded with the directives it fires the copy directive. So instead of firing bind first, it will on some ocasions run unbind first. So, to quickly fix this we just need to add On the first line of the unbind hook. PS: This still needs more deep investigation. But at least that would solve this. best regards |
When is the PR from above will be merged? It solves for me too. |
Hello,
When the component is destroyed, I'm getting the following error:
Error in directive clipboard unbind hook: "TypeError: Cannot read property 'destroy' of undefined"
Thanks.
The text was updated successfully, but these errors were encountered: