Skip to main content

Search and Top Navigation

#6645 closed bug (fixed)

Opened November 10, 2010 08:39PM UTC

Closed November 12, 2010 01:19PM UTC

Last modified November 23, 2012 09:20PM UTC

Dialog: Missing element not found check in overlay code

Reported by: fracmak Owned by:
Priority: major Milestone: 1.8.7
Component: ui.dialog Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:
Description

When destroying an overlay (in the jquery.ui.dialog.js), the inArray() function is never checked under the circumstance that the element is no longer in the local instances array. This can cause problems with overlays being prematurely removed. I've sub

This can be triggered by having a dialog open already, then opening a dialog as follows:

var dialog = jQuery(html).dialog();

dialog.dialog("option", "close", function(){

dialog.remove();

});

When the dialog is closed, the destroy is called, when the close callback happens, the .remove() triggers the destroy to be called a second time.

Attachments (0)
Change History (7)

Changed November 11, 2010 01:58PM UTC by scottgonzalez comment:1

component: unfiledui.dialog
milestone: 1.51.9
priority: undecidedmajor

Changed November 12, 2010 01:19PM UTC by Jay Merrifield comment:2

resolution: → fixed
status: newclosed

Dialog: Make sure the overlay instance still exists before trying to remove it. Fixes #6645 - Dialog: Missing element not found check in overlay code.

Changeset: dfb35442975a95c91f6c28188fad021714d7098b

Changed November 12, 2010 01:19PM UTC by scottgonzalez comment:3

summary: Missing element not found check in overlay codeDialog: Missing element not found check in overlay code

Changed December 08, 2010 06:33PM UTC by scottgonzalez comment:4

milestone: 1.91.8.7

Changed December 10, 2010 04:24PM UTC by scottgonzalez comment:5

#6741 is a duplicate of this ticket.

Changed November 22, 2012 12:36PM UTC by Sentenryu comment:6

Please take a look on this jsfidle (took from #6741): http://jsbin.com/iniyo4

the problem persists when you close the third dialog with ESC, the first one is closed too, the second one doesn't respond to ESC.

Changed November 23, 2012 09:20PM UTC by tj.vantoll comment:7

@Sentenryu You seem to be describing an issue separate from the one this ticket was created with and the test case is using a really old version of jQuery UI.

Could you check whether the issue still occurs in the most recent version of jQuery UI and if so create another ticket. To get started, you can use this boilerplate: http://jsfiddle.net/ZgAqH/ Open the link and click to "Fork" (in the top menu) to get started.