Subscribe on changes!

v-model.lazy is not updating the value of an input when it has a focus

avatar
Aug 30th 2022

Vue version

after 3.2.0-beta.5

Link to minimal reproduction

https://jsfiddle.net/jtsacqey/24/

Steps to reproduce

  1. Type Jacob into the input.
  2. Hit enter.

same as https://github.com/vuejs/vue/issues/8346

What is expected?

Value property of the input element should be changed to Joseph, as was the value of the name property in the Vue instance.

What is actually happening?

Value property of the input element is not being changed.

System Info

No response

Any additional comments?

The value of the input is correctly being updated when using v-model without .lazy modifier. 3.2.0-beta.4 does not have this bug. This bug occurs since 3.2.0-beta.5.

avatar
Sep 2nd 2022

Works

Vue version

after 3.2.0-beta.5

Link to minimal reproduction

https://jsfiddle.net/jtsacqey/24/

Steps to reproduce

  1. Type Jacob into the input.
  2. Hit enter.

same as vuejs/vue#8346

What is expected?

Value property of the input element should be changed to Joseph, as was the value of the name property in the Vue instance.

What is actually happening?

Value property of the input element is not being changed.

System Info

No response

Any additional comments?

The value of the input is correctly being updated when using v-model without .lazy modifier. 3.2.0-beta.4 does not have this bug. This bug occurs since 3.2.0-beta.5.

I tested and works for me

avatar
Sep 8th 2022

@joaovinicius Works fine for focusout, such as tabbing and clicking elsewhere. However, if you type Jacob and press Enter, the characters in the input element will still be Jacob.

I use Google Chrome 104.0.5112.102

avatar
Oct 7th 2022

@joaovinicius Works fine for focusout, such as tabbing and clicking elsewhere. However, if you type Jacob and press Enter, the characters in the input element will still be Jacob.

I use Google Chrome 104.0.5112.102

No, works fine for me Recording 2022-10-07 at 16 47 54

avatar
Oct 12th 2022

@joaovinicius I'm sorry, my explanation was not good. It's the input element that doesn't work properly The div element works correctly. It is correct that the text of the input element is also "Joseph". 2022-10-13_04h23_15