Opened 10 years ago

Last modified 6 years ago

#16431 new defect

onEnd() fires before animation finished

Reported by: bill Owned by: Bryan Forbes
Priority: undecided Milestone: 1.15
Component: fx Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:


When onEnd() is specified as a parameter to wipeOut(), wipeIn(), etc., the user defined callback executes before the animation is truly finished.

For example, this code from dijit/Tree.js:

wipeOut = fxUtils.wipeOut({
        node: this.containerNode,
        duration: manager.defaultDuration,
        onEnd: function(){

It's due to this code in fx.js:

var fini = function(){
        s.overflow = o;
        s.height = "auto";
        s.display = "none";
connect.connect(anim, "onStop", fini);
connect.connect(anim, "onEnd", fini);

Since connect.connect() sets up after advice, fini() won't be called until after the user defined onEnd() method executes.

The workaround is for the user code to also use advice on the onEnd() method, rather than overriding it, but this is both inconvenient and non-intuitive.

Root cause of #16378.

Change History (3)

comment:1 Changed 10 years ago by bill

In [30123]:

Fix problem where collapseAll() and other asynchronous Tree methods resolve too early. Fixes #16378, refs #16431 !strict.

comment:2 Changed 7 years ago by dylan

Milestone: tbd1.12

comment:3 Changed 6 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.