Svelte 5: style:transform
not updating when transition:fly
is present on same element
#11156
Milestone
style:transform
not updating when transition:fly
is present on same element
#11156
Describe the bug
In Svelte 4, I was able to use both
style:transform="translateX({state}px)"
andtransition:fly
on the same element for implementing a draggable sheet/drawer. Transitions were used for when drawer is first opened and translate for moving usingon:mousemove
. But in Svelte 5 it seems liketransition:fly
overwrites? the translate that is present on style directive. I'm able to get the original functionality in svelte 5 by wrapping the drawer with another div which now has thetransition:fly
on it so they don't conflict. I'm not sure weather I was using these wrong or which behavior is correct.Reproduction
I'm using binded range input to demonstrate the translate behavior:
Svelte 4: https://svelte.dev/repl/e8e45423d69a409f92860c689b121e6b?version=4.2.14
Svelte 5: transition:fly and translate on same element behaviour REPL
Toggle Drawer
transform: translate
updates in Svelte 4 but not Svelte 5Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: