Opened 7 years ago

Closed 7 years ago

#9005 closed bug (duplicate)

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

Reported by: JMGrange Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.0
Keywords: 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 (1)

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

Resolution: duplicate
Status: newclosed

Duplicate of #9004.

Note: See TracTickets for help on using tickets.