You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UIs: fix "deprecated native modifier on v-on directive" (Vue3 MUST FIX) #14355
changed the title [-]UIs: fix "deprecated native modifier on v-on directive"[/-][+]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/+]on Aug 1, 2023
The .native modifier is not deprecated in Vue2 however the linter is throwing warnings for using it because we are using some Vue 3 features. We will need to remove .native modifiers as part of the migration to Vue 3 (see: https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html). The fix should be as simple as removing the modifier without any extra changes. I tried this in a couple existing repos that are still on Vue 2 with mixed success. Removing the .native modifier in Vue 2 mostly worked as expected but I ran into a few cases where the “click” event was not getting registered. Rather than do a partial fix I will move this back into the backlog to be completed as part of the Vue 3 migration. If the linter warnings become annoying we can always ignore the rule.
changed the title [-]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/-][+]UIs: fix "deprecated native modifier on v-on directive" (Vue3 MUST FIX)[/+]on Aug 2, 2023
Activity
severinbeauvais commentedon Jul 21, 2023
I don't know how to fix this so it needs to be researched and then fixed in code for all projects that have this issue, including:
^^ If the above cannot be done within the estimate of this ticket then please create new ticket(s).
[-]UIs: fix "deprecated native modifier on v-on directive"[/-][+]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/+]leodube-aot commentedon Aug 2, 2023
The .native modifier is not deprecated in Vue2 however the linter is throwing warnings for using it because we are using some Vue 3 features. We will need to remove .native modifiers as part of the migration to Vue 3 (see: https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html). The fix should be as simple as removing the modifier without any extra changes. I tried this in a couple existing repos that are still on Vue 2 with mixed success. Removing the .native modifier in Vue 2 mostly worked as expected but I ran into a few cases where the “click” event was not getting registered. Rather than do a partial fix I will move this back into the backlog to be completed as part of the Vue 3 migration. If the linter warnings become annoying we can always ignore the rule.
severinbeauvais commentedon Aug 2, 2023
Excellent analysis and reporting. I agree with your recommendations. Thanks!
[-]Must fix Vue3 - UIs: fix "deprecated native modifier on v-on directive"[/-][+]UIs: fix "deprecated native modifier on v-on directive" (Vue3 MUST FIX)[/+]