Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#9004 closed bug (fixed)

failed in _destroyOverlay when I destroy a modal dialog thau was never opened.

Reported by: JMGrange Owned by:
Priority: blocker Milestone: 1.10.1
Component: ui.dialog Version: 1.10.0
Keywords: regression Cc:
Blocked by: Blocking:

Description

I create a modal dialog. If I show this dialog the destroy works fine. If I call the destroy dialog function without showing at least one time this dialog, the _destroyOverlay function failed beacause overlay is null. I solve the problem by testing the overlayInstances value.

if ( $.ui.dialog.overlayInstances > 0 ) {

$.ui.dialog.overlayInstances--; if ( !$.ui.dialog.overlayInstances ) {

this._off( this.document, "focusin" );

} this.overlay.remove();

}

Change History (7)

comment:1 Changed 11 years ago by Scott González

Keywords: regression added
Milestone: none1.10.1
Priority: minorblocker
Status: newopen

Related to #9000.

comment:2 Changed 11 years ago by Scott González

#9005 is a duplicate of this ticket.

comment:4 Changed 11 years ago by petersendidit

Better pull request that handles this and #9000. https://github.com/jquery/jquery-ui/pull/893

comment:5 Changed 11 years ago by petersendidit

#9010 is a duplicate of this ticket.

comment:6 Changed 11 years ago by petersendidit

Resolution: fixed
Status: openclosed

Dialog: Don't handle overlays on destory if there are not any. Fixed: #9004 - failed in _destroyOverlay when I destroy a modal dialog thau was never opened. Fixed: #9000 Dialog leaves broken event handler after close/destroy in certain cases

Changeset: 649f105229b2a24adc21cba2d56cb05a59711ccb

comment:7 Changed 11 years ago by Scott González

#9032 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.