- From: Mark Kennedy via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 Aug 2018 15:24:32 +0000
- To: public-css-archive@w3.org
mkay581 has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-transitions] why doesn't transitionend event fire in some cases? == In [the spec for transitionend event](https://drafts.csswg.org/css-transitions/#transitionend), it mentions that the transitionend event does not fire > in the case where a transition is removed before completion, such as if the `transition-property` is removed I take it that it also does not fire in cases where the element is removed from the DOM, like if set to `display:none`, etc. Was this decision intentional? why does it not fire in these cases? I have started a [wait-for-element-transition library](https://github.com/mkay581/wait-for-element-transition) because current `transitionend` is not always reliable when you want to just write one set of code for both animated and non-animated logic or in the case where whether a set of elements can be animated is unknown. My lib allows a consumer to wait for an element to transition by returning a promise that resolves, the promise will resolve immediately if element is removed from DOM (or if `display:none` is applied) after the transition has started. I would rather not have to use a library for this so just wondering if there is a possibility to update the spec to support this use case. Thanks for your time! Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3043 using your GitHub account
Received on Wednesday, 22 August 2018 15:24:39 UTC