Open
Description
Vue version
3.5.13
Link to minimal reproduction
Steps to reproduce
After clicking a button to change the current value, the first input (with :value="current"
) shows the correct value, but the second input (with v-model="current"
) shows the previous value instead.
What is expected?
Both v-model
and :value
should display the current value at all times
What is actually happening?
Inputs with v-model
sometimes have a value that does not match the ref bound to it
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (16) x64 AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Memory: 13.86 GB / 30.66 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
Browsers:
Chrome: 131.0.6778.139
npmPackages:
vue: ^3.5.13 => 3.5.13
Any additional comments?
Best I can tell this bug only happens in very specific situations where there is a :key on the component containing the inputs and watchEffect happening in a certain order