Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#6804 closed defect (fixed)

Dialog: way to know when the show and hide animations have completed

Reported by: Ben Lowery Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 1.1.0
Keywords: Cc:
Blocked By: Blocking:

Description

Currently, show and hide are async operations due to the animated implementation and there is no way to know when show and hide have really completed.

Please modify show and hide to either take a callback which is called upon completion, or return either a dojo.Deferred whose callback is invoked upon completion (possibly passing the Dialog as an argument?) or return the _Animation that's driving show and hide(). I have no strong preference towards which api to expose.

Attachments (1)

6804.diff (909 bytes) - added by Karl Tiedt 9 years ago.
something like this should work…

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by bill

Component: GeneralDijit
Milestone: 1.4
Owner: anonymous deleted
Summary: Allow client of dijit.Dialog to know when the show and hide animations have completedDialog: way to know when the show and hide animations have completed

This was discussed on IRC last night. Note that although the animation object returns a Deferred, it's difficult to use because the animation object itself is reused (the next time you show the Dialog).

comment:2 Changed 11 years ago by bill

Milestone: 1.41.5

bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4

comment:3 Changed 9 years ago by bill

Milestone: 1.51.6

Changed 9 years ago by Karl Tiedt

Attachment: 6804.diff added

something like this should work...

comment:4 Changed 9 years ago by Karl Tiedt

Its really trivial since all widgets have onHide/onShow already... and Dialog already has onHide called from its onEnd of _fadeOut animation... just added the same to _fadeIn animations onEnd...

comment:5 Changed 9 years ago by Karl Tiedt

comment:6 Changed 9 years ago by bill

Owner: set to bill
Status: newassigned

Except that Dialog calls _onShow() at the beginning of the animation to trigger the href load.

comment:7 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [23320]) Make Dialog.show() and Dialog.hide() return a dojo.Deferred that resolves when the animation is complete, fixes #6804 !strict.

comment:8 Changed 9 years ago by bill

(In [23321]) Make Dialog.show() and Dialog.hide() return a dojo.Deferred that resolves when the animation is complete, fixes #6804 !strict.

Note: See TracTickets for help on using tickets.