Opened 10 years ago
Closed 10 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/
Note: See
TracTickets for help on using
tickets.
Duplicate of #9004.