bug: Ionic/vue 3.1 compat mode doesn’t respond to @click events
See original GitHub issueBug Report
Ionic version:
[ ] 4.x [x] 5.x
Current behavior:
@click events are not fired when vue.config.js includes
config.resolve.alias.set("vue", "@vue/compat");
Expected behavior:
@click events should fire
Steps to reproduce:
Related code: A vanilla ionic start, upgrade to vue 3.1, add compat mode, and click events don’t fire ionic start myApp blank --type=vue
A sample application via GitHub https://github.com/inspire22/ionic-click-bug
I’d suspected that adding ion-* to isCustomElement might solve it, but it does not. It does work to put a div/span around the ionic element and move the click element handler to that.
Other information:
I created a thread in the forums first but didn’t hear anything so am adding a ticket. I’m sorry that my knowledge of vue/ionic isn’t enough to debug this further. https://forum.ionicframework.com/t/ionic-vue-3-1-compat-mode-doesnt-respond-to-click-events/211353
Ionic info:
Running on WSL 2 from windows 10 if it matters.
Ionic:
Ionic CLI : 6.12.2 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.6.9
Utility:
cordova-res (update available: 0.15.3) : 0.15.2
native-run : not installed
System:
NodeJS : v14.17.1 (/home/kevin/.nvm/versions/node/v14.17.1/bin/node)
npm : 7.17.0
OS : Linux 4.4
─────────────────────────────────────────────────
Ionic CLI update available: 6.12.2 → 6.16.3
Run npm i -g @ionic/cli to update
─────────────────────────────────────────────────
Thanks for a great project, I appreciate all the volunteers and staff that work on it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
It’s working great, thanks so much for your help 😃 I went ahead and updated my test app on github with the fix if anyone else runs into this. https://github.com/inspire22/ionic-click-bug
Thanks! Phew they shut that down fast lol, I’ll chime in with my 2c in case it helps.