Skip to main content

Search and Top Navigation

#9010 closed bug (duplicate)

Opened January 23, 2013 05:53PM UTC

Closed January 24, 2013 01:52AM UTC

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/

Attachments (0)
Change History (1)

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

resolution: → duplicate
status: newclosed

Duplicate of #9004.