Open dead-claudia opened 4 years ago
Note to whoever aims to fix this: it requires a lot of experimentation and will require significant knowledge of the internals. It'll be easiest if you set the bundler to watch mode and create a throwaway HTML file with the above body and keep the devtools open with caching disabled, so you can refresh the page frequently. And no, you won't be able to automatically test this until you can determine what causes the jumpiness.
@isiahmeadows I am not sure if this helps, but I think it's related to something we discussed in the past https://github.com/MithrilJS/mithril.js/issues/2135
@yossicadaner That's a separate issue, and this one's really rooted in a spec oddity (bug?).
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