ladybird/Tests/LibWeb/Text/input/css/transition-cancelled-on-property-change.html
Callum Law 025274cd86 LibWeb: Don't deassociate animations when deregistering transitions
Also renames the `clear_transitions` function to clarify this doesn't
affect the associated transition animations.

This fixes an issue where transitions weren't being cancelled when the
relevant transition-property entry was no longer present
2025-11-23 09:43:24 +01:00

24 lines
633 B
HTML

<!DOCTYPE html>
<style>
#foo {
transition: transform 100s;
}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
test(() => {
// No animations to start with
println(document.getAnimations().length);
foo.style.transform = "rotate(90deg)";
// One animation when transition starts
println(document.getAnimations().length);
foo.style.transitionProperty = "none";
// No animations after transition is cancelled because relevant transition property no longer exists
println(document.getAnimations().length);
});
</script>