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
Merged

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Jul 4, 2018

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:

@sodatea
Copy link
Member Author

sodatea commented Jul 4, 2018

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

@yyx990803 yyx990803 added this to In progress in 2.6 Dec 5, 2018
@yyx990803 yyx990803 moved this from In progress to Todo in 2.6 Dec 5, 2018
@yyx990803 yyx990803 moved this from Todo to In progress in 2.6 Dec 5, 2018
@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
No open projects
2.6
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants