cardstack/boxel

Investigate Safari bug where inserted sprite can be treated as kept

Closed this issue · 2 comments

This happened in the rules demo - after inserting, removing, then inserting a sprite again, it was treated as kept. This did not happen in Chrome.

We were not cleaning up freshlyRemovedChildren properly, so references to removed sprites stayed behind in the sprite tree. This wasn't an issue in Chrome because Chrome seems to clean up finished animations, but in Safari, finished animations stay on removed sprite's elements (while keeping the "finished" playState).

We were not cleaning up freshlyRemovedChildren properly, so references to removed sprites stayed behind in the sprite tree. This wasn't an issue in Chrome because Chrome seems to clean up finished animations, but in Safari, finished animations stay on removed sprite's elements (while keeping the "finished" playState).

Ah yeah I vaguely remember I fixed this previously, but it must have gotten lost in the refactor.

Think we could add a test for this so we don't introduce it again?