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

fix(v-model): ensure v-model listener trigger before listener with modifier(fix #11925) #11957

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

JuniorTour
Copy link
Contributor

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 #11925.

Before: https://jsfiddle.net/fxdez9qh/

After: https://jsfiddle.net/juniortour/ty7ps0kw/


What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

…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 JuniorTour force-pushed the ensure-v-model-trigger-at-first branch from d4b6041 to 0629e96 Compare March 20, 2021 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.once modifier on input event prevents v-model from updating value on input element.
1 participant