m0dch3n / vue-cli-plugin-cordova

Vue Cli 3 Cordova Plugin
MIT License
417 stars 63 forks source link

$emit() not firing off in mobile simulators #112

Closed vmarcel closed 4 years ago

vmarcel commented 4 years ago

Hey guys I wanted to know if there is some configuration implemented to have $emit() to work for mobile devices? It's not firing off at all, but when on a web browser it $emit works

m0dch3n commented 4 years ago

Hmmm, there is no reason, that $emit from vuejs is not working, if vue is working... On my simulator $emit is working without a problem

m0dch3n commented 4 years ago

have if you tried npm run serve and then open it in a normal webbrowser, without cordova?

vmarcel commented 4 years ago

@m0dch3n I did $emit() works fine in both safari and chrome. I also added a Cordova plugin to use WKWebView instead of the default UIWebview. Not sure if that affects anything

vmarcel commented 4 years ago

🤦‍♂I figured it out, I was missing an emit in a fundamental component. That was a complete oversight. Sorry for that.

m0dch3n commented 4 years ago

Ok, that would have been next question, if it's first level or multilevel... anyway problem solved

Strange that it worked within safari on your simulator... But maybe this was due to some hot reload caching issue, where Vue is not updating the components correctly, when they are modified

vmarcel commented 4 years ago

Yea I was refactoring the components and I must have removed it mistakenly, the caching seems to be the most likely result of why the browsers were working when I was moving stuff around