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
[Bug Report] warning with VueJS 2.6.11 #9999
Comments
Seeing this also on VIcon
I'm assuming it's related to https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VIcon/VIcon.ts#L194 |
This comment has been minimized.
This comment has been minimized.
Think it’s the Vue team you want to be poking, not the Vuetify guys. |
Not a workaround, but just too hide it: It was too annyoing so I went into the vue folder in node_modules, project search and removed the following
|
Although the warning was intentional as mentioned above by @icleolion. We can handle the Vue Warnings from const ignoreWarnMessage = 'The .native modifier for v-on is only valid on components but it was used on <div>.';
Vue.config.warnHandler = function (msg, vm, trace) {
// `trace` is the component hierarchy trace
if (msg === ignoreWarnMessage) {
msg = null;
vm = null;
trace = null;
}
} Not the best way but if you are frustrated by the console error just because you are using one of the vuetify component (v-calendar for me). |
Is this just a warning or will it affect anything? Should I use @Mondal10 method and simply ignore the warning, or should I downgrade to vue 2.6.10 instead? |
It seems has another affect. |
To be clear, I'm pretty sure this is a new error message in Vue, but it was meant to be implemented as a warning, not a console error. It remains the case that some Vuetify components are implementing the "native" modifier on their children elements, and so if that child is not itself a Vue component, this error is thrown. Vuetify should be checking to see if the child element is already native HTML before applying this modifier. |
I think that is "hack" for me, but it works and resolve problem without turning-Off of warnings. I'm just replace all "nativeOn" listeners in /node_modules/vuetify/dist/vuetify.js to "On" (without native). All works and doesn't push any warnings. |
@lunegov thanks this work! |
The solution is, in every case where this pattern is used in Vuetify:
I would submit a PR for this except I don't have much experience with hard-coding "render" methods as are used throughout Vuetify. Doing hacky work-around things just to suppress the warning is a mistake. The warning exists for a reason. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I am also experiencing this with VIcon |
This comment has been minimized.
This comment has been minimized.
Same problem here today:
|
That's not the solution. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fixes #9999 * fix(VCalendar): don't use nativeOn on native elements * fix(VList): don't use nativeOn when inactive
Fix causes regression with |
So is the intention for #11228 to fix VIcon this time around? Or do I need to raise a separate issue for that to be resolved via another method? |
Yes, the last one was merged unfinished with failing ci. |
Hi, I have the same issues with nuxt when I use v-calendar, I have the latest version of nuxt. |
This comment has been minimized.
This comment has been minimized.
Here's a temporary workaround usage of ignoring this message using warnhandler API as suggested above by @Mondal10. This version passes through everything except the ignored message as console errors, where the original suggestion does not. In main.js/ts:
|
@KaelWD has a PR on this but he's been very busy. Removing from 2.2.x for now. |
I don't know if that's actually possible without a change in Vue as well. It was added to fix #6228, some icon components don't properly pass listeners through and we can't tell before rendering how they actually behave.
If Vue treated |
fixes #9999 * fix: don't use nativeOn on native elements * fix(VList): don't use nativeOn when inactive * fix(VListItem): don't use mergeData setTextColor doesn't work when data.class is an array, and it's too much work to fix that everywhere else * test: update snapshots Co-authored-by: John Leider <john@vuetifyjs.com>
I'm still getting this error with latest |
VIcon is unfixable from Vuetify’s side. #11228 (comment) Requires Vue to fix it from their end. vuejs/vue#10939 |
For those still having issue with VIcon and are tracking this issue, figured I'd drop a note in here to say that #12148 has resolved the issue for VIcon now also. With both VIcon and VCalendar now fixed, you can now upgrade beyond Vue 2.6.10 without having your console flooded with errors! |
- Problem mit Vuetify Calender: vuetifyjs/vuetify#9999
Environment
Vuetify Version: 2.1.15
Vue Version: 2.6.11
Browsers: Chrome 79.0.3945.79
OS: Linux x86_64
Steps to reproduce
Use a
VCalendar
https://codepen.io/pen/?&editable=true&editors=101
Expected Behavior
No warning expected
Actual Behavior
A warning is displayed:
Reproduction Link
https://codepen.io/sshenron/pen/povRRgj?&editable=true&editors=101#anon-signup
Other comments
No warning with VueJS in 2.6.10.
The text was updated successfully, but these errors were encountered: