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 css attribute HMR failure #88

Merged
merged 2 commits into from
Jun 14, 2023
Merged

fix css attribute HMR failure #88

merged 2 commits into from
Jun 14, 2023

Conversation

Alfred-Skyblue
Copy link
Member

After adding CSS properties to it, I noticed that they didn't take effect. While modifying the codeToEval, I tried using Promise.resolve().then and setTimeout(()=>{},0) to execute it, but it still didn't work. However, when I adjusted the timeout to 1ms, it started working. Did it internally use setTimeout? Interestingly, I observed that other synchronous operations were working fine. This situation has left me confused. Nevertheless, the current changes I made are effective.

demo

Reproducible steps:

  1. Open the demo.
  2. Delete the style tag.
  3. Restore the style tag.
2023-05-22.19.55.18.mov

@yyx990803 yyx990803 merged commit 90e90c4 into vuejs:main Jun 14, 2023
@Alfred-Skyblue Alfred-Skyblue deleted the fix-preview branch June 14, 2023 11: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.

2 participants