Opened 7 years ago

Closed 7 years ago

#9010 closed bug (duplicate)

error when destroying a modal dialog

Reported by: JMGrange Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.0
Keywords: Cc:
Blocked by: Blocking:

Description

If you destroy a modal dialog before showing it the destroy function try to remove a null overlay. I solved the problen by modifying the code and removin the overlay only if overlayInstances > 0.

_destroyOverlay: function() {

if ( !this.options.modal ) {

return;

}

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

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

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

} this.overlay.remove();

}

}

sample in http://jsfiddle.net/JMGrange/QUT5m/

Change History (1)

comment:1 Changed 7 years ago by petersendidit

Resolution: duplicate
Status: newclosed

Duplicate of #9004.

Note: See TracTickets for help on using tickets.