Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.once modifier on input event prevents v-model from updating value on input element. #11925

Open
Nicolas-Yazzoom opened this issue Feb 25, 2021 · 3 comments · May be fixed by #11957
Open

.once modifier on input event prevents v-model from updating value on input element. #11925

Nicolas-Yazzoom opened this issue Feb 25, 2021 · 3 comments · May be fixed by #11957
Labels

Comments

@Nicolas-Yazzoom
Copy link

Version

2.6.11

Reproduction link

https://jsfiddle.net/fxdez9qh/

Steps to reproduce

Type some text in the input field.

What is expected?

The input handler is executed and the value in the input is updated.

What is actually happening?

The input handler is executed but the first update to the model is not applied. This means the first character typed will not show up.


I found this issue: #6552 It's a few years old and it was fixed but it seems to be the same problem.

@posva posva added the bug label Feb 25, 2021
@posva
Copy link
Member

posva commented Feb 25, 2021

It seems like the change on micro tasks on v2.6.0 brought back this bug.

Note: this bug is fixed on Vue 3

@ruyi789
Copy link

ruyi789 commented Mar 2, 2021

use v-model.var="variable" just update this variable ,not needs update components

JuniorTour added a commit to JuniorTour/vue that referenced this issue Mar 14, 2021
…difier

This reverts commit 62405aa.

Because after v2.6.0, nextTick always use microtask.
There will be an update between 2 listener and block the v-model
listener to update.
We need to ensure the listener of v-model is triggered before listener with
modifier to fix vuejs#11925.
JuniorTour added a commit to JuniorTour/vue that referenced this issue Mar 20, 2021
…difier

This reverts commit 62405aa.

Because after v2.6.0, nextTick always use microtask.
There will be an update between 2 listener and block the v-model
listener to update.
We need to ensure the listener of v-model is triggered before listener with
modifier to fix vuejs#11925.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants