Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent bubbling css transition events messing with animations #172

Open
axelpale opened this issue Nov 27, 2023 · 0 comments
Open

prevent bubbling css transition events messing with animations #172

axelpale opened this issue Nov 27, 2023 · 0 comments

Comments

@axelpale
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant