svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Svelte 5: Adding a delay param to svelte transitions causes the node to immediately appear for the duration of the delay

Open Mali-2 opened this issue 10 months ago • 4 comments

Describe the bug

Adding a delay param to svelte transitions in svelte 5 causes the node to immediately appear for the duration of the delay. After this period the node disappears and starts its transition. Removing the delay param fixes this issue.

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE6VQzUrEMBB-ldmodBciba8xLXjzAbxZD7Gd0GCalGSqlpB3l-winhTEywwz8_0xiWljMTLxlJhTCzLB7teVcUb7Wob4hpaQcRb9FsaykXEMZqV-cAOZZfWBIIFWE3LQducQR2URMujgF6gu_JqCctGQ8a66K0SLBHH279DBdSRFeNTKRjyVo5P1t4WTLxuRd-DdaM342qXjqeu_uIfSc1-qrC_AfnDpyugzIhcrObdgnCgJu5QmtGoX0DZNw2HagiqZLnPO_QNa6-FxxoAHWc9tEauNzj9p2v13SQ4fAqrbtrmp_q5-fuQ_Ig-Ocbb4yWiDExMUNszP-RPaLwNI8QEAAA==

Logs

No response

System Info

Browser: Chrome Version 123.0.6312.122 (Official Build) (arm64), m1 mac
Locally: "svelte": "5.0.0-next.110"

Severity

blocking an upgrade

Mali-2 avatar Apr 21 '24 00:04 Mali-2

Quickly chiming in here as it was related to the https://github.com/sveltejs/svelte/pull/11216 fix

At first sight, changing fill: 'forwards' to fill: 'both' fixes this issue, although as stated in my comment it creates unexpected behavior but this time it's "stacked".

While testing delayed WAAPI animate() with fill: 'both' in my nested transition-heavy tree, clicking an expandable item multiple times would result in a stacked animation to be applied. Previous animation isn't aborted so it ends up as if we simply executed the call animate({delay:1000,...}) multiple times.

Xerios avatar Apr 21 '24 10:04 Xerios

Broken from alpha 82; working in alpha 81 (stackblitz demo).

svelte-kit-so-good avatar Apr 25 '24 22:04 svelte-kit-so-good

Basically the same as #10876

PatrickG avatar Apr 27 '24 07:04 PatrickG

Adding my flip repro to this as it affects flip too.

Any delay at all causes the items to jarringly appear in their new locations until the delay is over before snapping back just as the animation starts.

coldino avatar May 15 '24 10:05 coldino

This should have been fixed by #12389 , can you test if now is working properly?

JLAcostaEC avatar Jul 11 '24 21:07 JLAcostaEC

Fixed by #12389

dummdidumm avatar Jul 15 '24 14:07 dummdidumm