Search and Top Navigation
#8684 closed bug (fixed)
Opened October 16, 2012 09:57AM UTC
Closed October 18, 2012 12:29AM UTC
Last modified October 23, 2012 08:18PM UTC
jQuery dialog with hide options does not trigger close event
Reported by: | MarcoVanK | Owned by: | petersendidit |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.1 |
Component: | ui.dialog | Version: | 1.9.0 |
Keywords: | regression | Cc: | |
Blocked by: | Blocking: |
Description
When using the Close event in combination with a hide option the close event won't be triggered anymore. See http://jsfiddle.net/V3eg4/3/ for an example.
The problem (i think) is that the callback method supplied to this.uiDialog.hide is not processed correctly in the _normalizeArguments method.
In the dialog.close method i modified the following lines
if ( this.options.hide ) {
this.uiDialog.hide( this.options.hide, function() {
that._trigger( "close", event );
});
} else {
this.uiDialog.hide();
this._trigger( "close", event );
}
into
if ( this.options.hide ) {
this.options.hide.complete = function() {
that._trigger( "close", event );
};
this.uiDialog.hide( this.options.hide);
} else {
this.uiDialog.hide();
this._trigger( "close", event );
}
With this modification the close event is triggered correctly, not sure if this is the best solution though...
Attachments (0)
Change History (7)
Changed October 16, 2012 02:06PM UTC by comment:1
status: | new → open |
---|
Changed October 17, 2012 02:52AM UTC by comment:2
keywords: | → regression |
---|---|
milestone: | 1.10.0 → 1.9.1 |
priority: | minor → blocker |
May be caused by #8670.
Changed October 17, 2012 12:40PM UTC by comment:3
owner: | → petersendidit |
---|---|
status: | open → assigned |
Changed October 17, 2012 01:30PM UTC by comment:4
Pull request to fix this issue: https://github.com/jquery/jquery-ui/pull/773
Verified. Here's a minimal fiddle - http://jsfiddle.net/tj_vantoll/c8G2g/.