Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18506 closed defect (invalid)

"fx.fadeOut" does not call the function onEnd passed as "__FadeArgs" argument

Reported by: 65KrivonosovAV Owned by: 65KrivonosovAV
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

The fx.fadeout function is called In the body of the dijit.Dialog.hide() function. The fx.fadeout function is called with the arguments __FadeArgs {..., onEnd: function(){...}} but the onEnd function is never called. Renaming "onEnd" to "onStop" solves the problem.

Change History (5)

comment:1 Changed 5 years ago by bill

Component: fxDijit
Description: modified (diff)
Owner: changed from Bryan Forbes to bill
Status: newassigned

OK, sounds like a dijit problem?

comment:2 Changed 5 years ago by 65KrivonosovAV

This occurs after the function call Dialog.hide () + Dialog.destroy () but not always (CancelError? appears in log). OK, maybe it's a dijit problem.

I define two functions "onEnd" and "onStop" of the same content in the call of fx.fadeOut in Dialog.hide(). then the CancelError? disappears

comment:3 Changed 5 years ago by bill

Owner: changed from bill to 65KrivonosovAV
Status: assignedpending

I looked into this some more. You said:

the onEnd function is never called

Actually, it is called. You can set a breakpoint there and see it fire in http://download.dojotoolkit.org/release-1.10.2/dojo-release-1.10.2/dijit/tests/test_Dialog.html, after opening then closing a dialog.

This occurs after the function call Dialog.hide () + Dialog.destroy () but not always (CancelError? appears in log).

That's what the "Show self destruct dialog" button in the above test case is checking. And, it's working for me consistently.

I do see that destroying the Dialog can call .stop() on the animation, via:

this._fadeOutDeferred = new Deferred(lang.hitch(this, function(){
	fadeOut.stop();
	delete this._fadeOutDeferred;
}));

And that will trigger an onStop method (if it exists) rather than an onEnd() method. But the test case I have doesn't trigger that code.

So, please attach a minimal testcase using the "Attach file" button. Thanks.

comment:4 Changed 5 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:5 Changed 5 years ago by bill

PS: To clarify, if you call .destroy() immediately after calling .hide(), then it's true that the onEnd() method won't be called, but I don't see any reason to think that's "a problem".

Note: See TracTickets for help on using tickets.