Commit 1ef297f
authored
fix: ensure tick resolves within a macrotask (#16825)
Race them against each other - in almost all cases requestAnimationFrame will fire first, but e.g. in case the window is not focused or a view transition happens, requestAnimationFrame will be delayed and setTimeout helps us resolve fast enough in that case
Fixes #16429
Fixes sveltejs/kit#142201 parent 5e6fed6 commit 1ef297f
File tree
2 files changed
+12
-1
lines changed- .changeset
- packages/svelte/src/internal/client
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
| |||
0 commit comments