Opened 13 years ago

Closed 12 years ago

#5523 closed bug (fixed)

Dialog overlay bug for nested dialogs

Reported by: w4x Owned by:
Priority: major Milestone: 1.8.7
Component: ui.dialog Version: 1.8
Keywords: dialog overlay Cc:
Blocked by: Blocking:



reproduce: Steps to reproduce:

  1. create a dialog (dialog) by clicking on the button
  2. create another dialog (dialogA) by clicking on the "create" button inside first dialog
  3. close dialogA
  4. repeat steps 2-3
  5. overlay of the first dialog has been disappeared

Change History (5)

comment:1 in reply to:  description Changed 13 years ago by watanabe

jQuery UI 1.8 uncompressed version

line 174(dialog destroy), 204(dialog close)


line 724(overlay destroy)

this.oldInstances.push(this.instances.splice($.inArray($el, this.instances), 1)[0]);

"duplicate overlay.destroy()" makes "instances & oldInstances in $.ui.dialog.overlay" broken.

Workaround-A: line 724(overlay destroy)

var index = $.inArray($el, this.instances);
if (index >= 0) this.oldInstances.push(this.instances.splice(index, 1)[0]);

Workaround-B: line 204(dialog close)

self.overlay.destroy(); self.overlay = null;

comment:2 Changed 13 years ago by womp

I can duplicate this in 1.8.2. Very frustrating. Thanks for the workaround!

comment:3 Changed 12 years ago by Scott González

Milestone: 1.9

comment:4 Changed 12 years ago by adovenmuehle

Using the latest jQuery UI (1.8.13) this bug appears to be fixed. See (Updated the original example to use the latest jQuery UI)

comment:5 Changed 12 years ago by Scott González

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.