Ticket #5288 (closed bug: duplicate)
opening ui dialog does not work for the second time
|Reported by:||Gruewo||Owned by:|
as we updated from jquery ui 1.7.2 to 1.8rc3 we noticed that the dialog widget does not work for the second time opened(1, 3-... times work).
tracking the error down we found out that it happens in the line:
625: var $el = (this.oldInstances.length ? this.oldInstances.splice(0, 1) : $('<div></div>').addClass('ui-widget-overlay'))
the problem is that the oldInstances array contains a valid element (used for the first opening of the dialog) and a second element that has the value undefined - and this is the problem as the above expression tries to call .appendTo(document.body) on the array element