#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
Keywords: | regression added |
---|---|
Milestone: | none → 1.10.1 |
Priority: | minor → blocker |
Status: | new → open |
comment:4 Changed 11 years ago by
Better pull request that handles this and #9000. https://github.com/jquery/jquery-ui/pull/893
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
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
Related to #9000.