Skip to content

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