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 comment:1
component: | unfiled → ui.dialog |
---|---|
milestone: | 1.5 → 1.9 |
priority: | undecided → major |
Changed November 12, 2010 01:19PM UTC by comment:2
resolution: | → fixed |
---|---|
status: | new → closed |
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 comment:3
summary: | Missing element not found check in overlay code → Dialog: Missing element not found check in overlay code |
---|
Changed December 08, 2010 06:33PM UTC by comment:4
milestone: | 1.9 → 1.8.7 |
---|
Changed November 22, 2012 12:36PM UTC by 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 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.