core
core copied to clipboard
Interpolation in an elements slot creates invalid output if element is created with <component is> and has contentediable attribute
Vue version
3.2.37
Link to minimal reproduction
https://sfc.vuejs.org/#eNp9UU1r3DAQ/StTUbADawmaQ8HshpRS6KE99dCLLt7VZKNWloQ09iYY//eOvNnt5oMcDJ6ZN++N3pvElxjlOKBoxTrvko0EGWmIN9rbPoZEMEHCuxUE/zMMntDADHcp9FDxVqW99rvgM0Gf97Ap0Lr6js4F+B2SMx+qqxPgI7ongB+c47b2Z866voLNDUzaQ8HJsXMDys6YbyN6+mEzocdUV1s3pGoFF2iAwh4cShf29f9dwgf6GpjbE0sVHB94nPEVb+IKbGZw+QBOZ1NX3lUZOy6PXaujS+wPF4R9dB0hVwDrXWDHPDNBa/NGC17VotxX2NFY6rYOuc8rlhsP1ATvHhnCpnCbj+L/NtPjgpoO95bwV+x22EIVEzaH1MVq1mJRA5imxfR5XsTVWZ3Ha3W+TKzEMcim76L8k4PnqBfr9NMga9GezNSCUy21FvdEMbdKDT7+3UtmV7c8U4kDsz02JvS31/KTvP6sDOdz2ZeY+2abwiFjYkUtVhfkipsjpiahN5gwvSv2AvtM8MXslegSJ6cp5n8XQv7g
Steps to reproduce
- double click to edit content
- use
enter
to make a line - input something, like
cc
- blur
What is expected?
the content is Hello World \n cc
What is actually happening?
the content is Hello World \n cc \n cc
System Info
No response
Any additional comments?
No response
temporally use v-text
to solve this problem
It will add a new text Node after press enter. Vue only patch the focused text Node when blur. That's why the textContent is incorrent.