Updates to keyed lists break FLIP animations when they occur mid-animation #2612
Labels
Area: Core
For anything dealing with Mithril core itself
Type: Bug
For bugs and any other unexpected breakage
Mithril version: 2.0.4
Browser and OS: Chrome 83.0.4103.116 on Windows 64-bit, Safari 13.1 on iOS, Firefox 78.0.2 on Windows 64-bit
Project:
Code
Live Flems
Steps to Reproduce
You can enable and disable the animations at will using the "Toggle" button, but that's not part of the repro.
Expected Behavior
The animation to be smooth.
Current Behavior
The animation appears choppy whenever the subtree updates, and list items often unexpectedly jump.
Context
The following vanilla code works correctly. It's a near-exact clone of the above, but it simply uses
appendChild
instead of a full keyed diff.Live Flems
Edit:
Mithril's far from the only one with this issue: https://twitter.com/isiahmeadows1/status/1284726730574315522
Note: Vue is not affected by this bug and carries the same behavior as the vanilla version - go here and spam the "Shuffle" button to see.
Edit 2: Also relevant: https://github.com/whatwg/html/issues/5742
The text was updated successfully, but these errors were encountered: