Search and Top Navigation
#9004 closed bug (fixed)
Opened January 23, 2013 09:53AM UTC
Closed January 25, 2013 03:36AM UTC
Last modified January 30, 2013 06:25PM UTC
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();
}
Attachments (0)
Change History (7)
Changed January 23, 2013 01:40PM UTC by comment:1
keywords: | → regression |
---|---|
milestone: | none → 1.10.1 |
priority: | minor → blocker |
status: | new → open |
Changed January 24, 2013 01:13AM UTC by comment:3
Changed January 24, 2013 01:37AM UTC by comment:4
Better pull request that handles this and #9000. https://github.com/jquery/jquery-ui/pull/893
Changed January 25, 2013 03:36AM UTC by comment:6
resolution: | → fixed |
---|---|
status: | open → closed |
Related to #9000.