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

Plugin doesn't appear to work with Vue #62

Closed
do-adams opened this issue Dec 21, 2019 · 2 comments
Closed

Plugin doesn't appear to work with Vue #62

do-adams opened this issue Dec 21, 2019 · 2 comments

Comments

@do-adams
Copy link

do-adams commented Dec 21, 2019

Issue: This plugin doesn't appear to work when used alongside the Vue JavaScript library.

Here's a demo illustrating the problem: https://codepen.io/d-at-pm/pen/bGNqZzb

In this scenario the Bootstrap dependencies and the plugin are initialized before Vue is mounted into the DOM. Once a new file is selected the input label does not update with the new filename.

It is worth mentioning that if the plugin itself is initialized after Vue is mounted to the DOM then it does work.

This might not actually be an issue with this plugin itself and probably due to the way that Vue handles DOM nodes when initialized but I am curious if anyone else is aware of or has experienced this issue.

@Johann-S
Copy link
Owner

Hi @do-adams,

This plugin is written in VanillaJS so it should work everywhere.

Like you said:

It is worth mentioning that if the plugin itself is initialized after Vue is mounted to the DOM then it does work.

I think it's something related to how VueJS works but not related on how this plugin works.

I close this issue but feel free to discuss here that subject.

@do-adams
Copy link
Author

do-adams commented Dec 23, 2019

Thanks for taking the time to address the issue @Johann-S

Happy Holidays!

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

2 participants