-
- Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Labels
has workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: custom elements
Description
Vue version
3.3.11
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-jeblju?file=src%2FApp.vue
Steps to reproduce
- Open Stackblitz
- Observe that
my-input
is double rendering when wrapped in adiv
while usingv-model
What is expected?
my-input
should be able to use v-model
when it is placed inside of an HTMLElement
.
What is actually happening?
- When
my-input
usesv-model
the contents of the custom element's shadow root are duplicated. This only happens when it is wrapped in anHTMLElement
like adiv
. - When
my-input
's parent istemplate
this issue doesn't occur. - Additionally this only seems to impact custom elements that are created with
defineCustomElement
, that are then reused in Vue (components created with Lit for example, don't seem impacted).
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.18.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.4.2 - /usr/local/bin/npm pnpm: 8.10.5 - /usr/local/bin/pnpm npmPackages: vue: ^3.3.11 => 3.3.13
Any additional comments?
I found this issue when working to get different v-model
types working with custom elements, #9883.
Metadata
Metadata
Assignees
Labels
has workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: custom elements