W3C home > Mailing lists > Public > www-style@w3.org > February 2011

RE: [css3-transitions] What should happen when a value is changed midway through a transition?

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Thu, 24 Feb 2011 18:24:19 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, louis-rémi BABE <lrbabe@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <045A765940533D4CA4933A4A7E32597E2AB842C1@TK5EX14MBXC113.redmond.corp.microsoft.com>

[Tab Atkins:]

> 2011/2/24 louis-rémi BABE <lrbabe@gmail.com>:
> > 3. All js libraries can run a callback function when the transition
> > completed, _no matter how and when it completed_ (e.g.
> > http://api.jquery.com/animate/ &
> > http://mootools.net/docs/core/Fx/Fx#Fx:constructor ).
> >   It is specified that "The completion of a CSS Transition generates a
> > corresponding DOM Event.". However, current implementations do not
> > generate a transitionend event immediately when transitions complete
> > prematurely and do not generate transitionend event at all when the
> > transition is stopped midway through.
> >   It should be clearly specified that a transitionend event should be
> > generated immediately in both cases.
> 
> Do you mean that, if a transition completes prematurely, browsers
> currently still only fire the transitionend event at the original end-time
> of the transition?  That sounds like a bug.
> 
> If a transition is stopped midway through by removing the property from
> the transition list, I don't think it should fire a transitionend event -
> the transition didn't end, it was forcibly deleted.  Stopping it by
> setting the duration to 0 should still fire an event immediately, though.

Even if the transition did not complete you might still want to be notified
that it ended. I agree firing the completion event no matter what sounds like 
a bug. 

I'd note a transition start event may also be useful but is currently not
specified. 
Received on Thursday, 24 February 2011 18:24:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT