Skip to main content

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 tj.vantoll comment:1

status: newopen

Verified. Here's a minimal fiddle - http://jsfiddle.net/tj_vantoll/c8G2g/.

Changed October 17, 2012 02:52AM UTC by scottgonzalez comment:2

keywords: → regression
milestone: 1.10.01.9.1
priority: minorblocker

May be caused by #8670.

Changed October 17, 2012 12:40PM UTC by petersendidit comment:3

owner: → petersendidit
status: openassigned

Changed October 17, 2012 01:30PM UTC by petersendidit comment:4

Pull request to fix this issue: https://github.com/jquery/jquery-ui/pull/773

Changed October 17, 2012 03:26PM UTC by scottgonzalez comment:5

#8695 is a duplicate of this ticket.

Changed October 18, 2012 12:29AM UTC by David Petersen comment:6

resolution: → fixed
status: assignedclosed

Dialog: Use _hide() to make sure close event gets triggered. Fixes #8684 - jQuery dialog with hide options does not trigger close event.

Changeset: 35dc9307fc2ce5d2016e8848fdc578829867f97e

Changed October 23, 2012 08:18PM UTC by scottgonzalez comment:7

#8579 is a duplicate of this ticket.