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: always use microtasks for nextTick #8450

Merged
merged 2 commits into from
Dec 19, 2018

Conversation

haoqunjiang
Copy link
Member

fix #7109, #7546, #7707, #7834, #8109
reopen #6566

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:

@haoqunjiang
Copy link
Member Author

Note:
This PR also reopens #6690, which has a workaround #6740

@yyx990803 yyx990803 changed the base branch from dev to 2.6 December 19, 2018 18:23
@nicolaskopp
Copy link

nicolaskopp commented Jun 26, 2023

Very late to the game, but this change did indeed introduce a breaking change, because it interferes with Cleave.js and updated input events (e.g. nextTick firing before InputField changes were properly populated). (Also see nosir/cleave.js#459 )

Solution: https://javascript.info/event-loop#macrotasks-and-microtasks

Before this change, something like this worked:

onValueChanged({ target }) {
      this.$nextTick(() => {
         // stuff
      });
}

Now you need to invoke a MacroTask:

onValueChanged({ target }) {
      setTimeout(() => {
         // stuff
      });
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants