Bug when closing one dialog within multiple stacked dialogs
Hi, I'm using UI dialog with the stack: true option.
I was able to open multiple dialogs as shown in the screenshot below.
I opened the dialogs in the labelled order.
If I close dialog #1, dialog #2 and #3 (highlighted in yellow in screenshot below; near the top edge) will be positioned out of bound by css top value.
The only way for the close to work properly is to close the dialog in the order of which was last opened.
Is this a bug with jQuery UI or my code?
Here's my code to open up dialogs
- $('div.module[rel="pms"] a.pm_expand').live('click', expand_pm_body);
- expand_pm_body = function() {
- if (processing_ajax === 0) {
- var pm_threadid = $(this).parents('tr.row').attr('id').split('_')[$(this).parents('tr.row').attr('id').split('_').length-1];
- if ($(".view_full_pm_thread#pmt_"+pm_threadid).html() == null) {
- $('#social_share_form').after('<div id="pmt_'+pm_threadid+'" class="view_full_pm_thread"></div>"');
- $(".view_full_pm_thread#pmt_"+pm_threadid).dialog({
- bgiframe: true,
- autoOpen: false,
- height: 300,
- width: 600,
- position: 'center',
- stack: true,
- title: 'View PM Thread',
- focus: function() {
- $('.view_full_pm_thread#pmt_'+pm_threadid).fadeTo('fast', 1);
- $('.view_full_pm_thread:not(#pmt_'+pm_threadid+')').fadeTo('fast', 0.5);
- }
- });
- }
- processing_ajax = 1;
- $.ajax({
- data: settings.ajax.data_prefix+"get_full_pm_body&pm_threadid="+pm_threadid,
- success: function(server_reply) {
- if (func.ajax.verify_sync(server_reply)) {
- $('.view_full_pm_thread#pmt_'+pm_threadid).html(server_reply).dialog('open');
- }
- processing_ajax = 0;
- }
- });
- return false;
- } else {
- return false;
- };
- };
Login info: jquery_tester / testjquery
Steps to reproduce:
- At the top left corner of the site, next to 'jquery_tester' username, click NeoPM.
- Click on multiple pm titles to view full PM threads.
- Close the dialogs in a random order.
Thanks in advance.