-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
When replacing the last item in a list (#each block) that is inside of a scrollable parent,
While the scroller position is at the bottom of said scrollable container (the last item is visible),
and using flip animation,
the container scrolls up to the one before last item automatically instead of staying put and showing the last item.
Logs
N/A
To Reproduce
https://svelte.dev/repl/2ec547f272a840639d7e483f49de3a38?version=3.21.0.
(instructions inside, basically scroll the list down and click the button)
Expected behavior
the scroll position should stay at the bottom of the container, showing the last item.
Stacktraces
N/A
Information about your Svelte project:
-
Your browser and the version: Chrome 81.0.4044.113, Firefox 75.0
-
Your operating system: Mac OS Catalina 10.15.4
-
Svelte version (Please check you can reproduce the issue with the latest release!)
verified with 3.2.1 -
Whether your project uses Webpack or Rollup
Rollup
Severity
I have found a workaround: rather than replacing the element and the id, i keep the old id.
It is sufficient for my needs, therefore I would say that the priority for me is low.
Still, this might point to a deeper issue with the animation system
Additional context
Thanks :)