Skip to main content

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 scottgonzalez comment:1

keywords: → regression
milestone: none1.10.1
priority: minorblocker
status: newopen

Related to #9000.

Changed January 23, 2013 02:07PM UTC by scottgonzalez comment:2

#9005 is a duplicate of this ticket.

Changed January 24, 2013 01:13AM UTC by petersendidit comment:3

Changed January 24, 2013 01:37AM UTC by petersendidit comment:4

Better pull request that handles this and #9000. https://github.com/jquery/jquery-ui/pull/893

Changed January 24, 2013 01:52AM UTC by petersendidit comment:5

#9010 is a duplicate of this ticket.

Changed January 25, 2013 03:36AM UTC by petersendidit comment:6

resolution: → fixed
status: openclosed

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

Changed January 30, 2013 06:25PM UTC by scottgonzalez comment:7

#9032 is a duplicate of this ticket.