sveltejs / svelte

web development for the rest of us
https://svelte.dev
MIT License
79.54k stars 4.2k forks source link

Svelte 5: Binding `offsetHeight` in outro transition is correctly reflected in `$inspect` but not in `$effect` #13907

Open Serator opened 2 days ago

Serator commented 2 days ago

Describe the bug

When playing the transition backwards, offsetHeight is correctly output in $inspect, but stops outputting in $effect.

https://github.com/user-attachments/assets/c2fd9ed1-f12f-47a6-a8a8-57a6ac346e57

Reproduction

Logs

No response

System Info

-

Severity

annoyance

Serator commented 1 day ago

I guess there is a bug in my example and I need to use $effect.root (example in rune mode) to achieve the desired result.

If this is correct, please close this issue. Thanks!

7nik commented 1 day ago

The reactivity stops during the outro by design.

Serator commented 1 day ago

Thanks, I was thinking something like that, but wasn't sure about it. It would be nice to reflect it in the documentation.