Behavioural difference when using v-on on SFCs and HTML elements, on Vapor mode vs Virtual DOM #13828
Replies: 2 comments 4 replies
-
Closed, as this PR (#13053) does show that component events are allowed to "fallthrough" (But seems like that PR doesn't directly fix this issue yet?) |
Beta Was this translation helpful? Give feedback.
0 replies
-
see #13382 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So normally (non-Vapor mode) when using
v-on
with modifiers (E.g..prevent.self
), the modifier will work regardless of the type of element/component. So both SFCs and HTML elements will be applied with the given modifiers.See screenshot of generated code
But on Vapor mode, modifiers attached to
v-on
are not applied to SFCs. I thought this was a bug, but looking at the docs, it doesn't really specify that a custom component should handlev-on
the same way as plain HTML elements does (just that it will handle the component's events/emits)So my question is that in this case, should Vapor mode try to mimic the behaviour of non-Vapor mode Vue? Even though it's not documented, as noted by the
Behavior Consistency
section in the release note? (Or the current implementation is an unintended feature?)- Playground link (With
cannot redefine property: class
fix (Uses playground from this PR, #13382))- Minimal reproducible link (With
cannot redefine property: class
fix (Uses playground from this PR, #13382))EDIT: Added clarification for the playground URLs with fix
Beta Was this translation helpful? Give feedback.
All reactions