Skip to content

prevent bubbling css transition events messing with animations #172

@axelpale

Description

@axelpale

Animatable:animateOnce places a listener on HTMLElement transitionend event. This listener clears transition property, clears all related listeners and request the component to emit idle as a sign of an ended transformation.

The problem is that CSS transition events bubble. Therefore a transition event closer to leaf of the DOM tree will bubble, regardless of the transition property being set by Tapspace or the host app.

This can cause sudden end of animations set up with animateOnce. A quick animation of a descendant element interrupts any longer animations of its ancestors.

Solution: in animateOnce, handle only events where the target is the space element itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions