Opened 13 years ago

Closed 9 years ago

Last modified 9 years ago

#2238 closed defect (fixed)

Dialog: consecutive Dialog hide and show issue

Reported by: guest Owned by: bill
Priority: high Milestone: 1.6
Component: Dijit Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Creating 2 dialog boxes and consecutively showing and hiding of each leads to a show() that displays nothing with greyed back ground.

example. Click link over and over till issue.

			dojo.require("dojo.widget.*");
			dojo.addOnLoad(onload);
			function onload()
			{
			var parentnode = document.createElement("div");
			var srcNode = document.createElement("div");
			parentnode.appendChild(srcNode);
			dlg1=dojo.widget.createWidget("Dialog",{toggle:"fade"},srcNode);
			dlg1.setContent("<a href='#' onclick='dlg2test()'> dlg1 </a>");

			var srcNode2 = document.createElement("div");
			parentnode.appendChild(srcNode2);

			dlg2=dojo.widget.createWidget("Dialog",{toggle:"fade"},srcNode2);
			dlg2.setContent("<a href='#' onclick='dlg1test()'> dlg2 </a>");
				
			dlg1.show();
			
			}
			function dlg1test()
			{
				dlg2.hide();
				dlg1.show();
			}
			function dlg2test()
			{
				dlg1.hide();	
				dlg2.show();
			}

Attachments (1)

test.html (1.6 KB) - added by bill 10 years ago.
underlay disappearing problem from #10257

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by bill

Component: WidgetsDijit
Description: modified (diff)
Milestone: 1.0
Owner: changed from bill to koranteng

comment:2 Changed 12 years ago by bill

Milestone: 1.02.0

comment:3 Changed 12 years ago by bill

Owner: koranteng deleted

comment:4 Changed 12 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:5 Changed 11 years ago by bill

Description: modified (diff)
Milestone: 1.3future
Summary: Consecutive Dialog hide and show issueDialog: consecutive Dialog hide and show issue

Yes, I assume the problem is that you are trying to show the second dialog before the first one has finished disappearing (or vice-versa).

comment:6 Changed 10 years ago by bill

Another test case and problem w/underlay in #10257.

Changed 10 years ago by bill

Attachment: test.html added

underlay disappearing problem from #10257

comment:7 Changed 9 years ago by bill

Milestone: future1.6
Owner: set to bill
Status: newassigned

comment:8 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [22662]) Refactoring Dialog to handle when multiple dialogs are displayed and a non-top-level dialog is hidden or destroyed. The salient change is that rather than a Dialog saving the previous focus, there's a "level manager" that remembers each active layer (starting with the base page itself) and the focus in that layer.

Also fixes race conditions on concurrent dialog show/hide.

Previously Dialog._onKey was connected to the document body. I couldn't find a case when that was necessary (as opposed to connecting to Dialog.domNode), so I changed it to attach to Dialog.domNode, so Dialog wouldn't have to check "am I the top dialog on the stack?" in that method.

Fixes #2238, #9944, #10705 !strict.

comment:9 Changed 9 years ago by ben hockey

Resolution: fixed
Status: closedreopened

not sure which one of the 3 tickets closed by r22662 i should comment on so just picking one...

i think this line: pd.dialog._getFocusItems(pd.domNode);

might need to be: pd.dialog._getFocusItems(pd.dialog.domNode);

if by just looking at it you're not sure then let me know and i'll work on a test case.

comment:10 Changed 9 years ago by bill

Thanks, you are right, I'll check that in w/a test case. (As for all the tickets, I should have consolidated them into one.)

comment:11 Changed 9 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [22774]) Fix typo in code for corner case where two dialogs display near simultaneously and the lower dialog never gets focus. Fixes #2238 !strict.

comment:12 Changed 9 years ago by luis

Resolution: fixed
Status: closedreopened

Hi, I am having the same problem that #10257; I would like to know if there is fixed with #2238. I tried it but still not working. Thanks

comment:13 Changed 9 years ago by bill

Resolution: fixed
Status: reopenedclosed

#10527 is fixed; you can try the attached test case, updating it to run against the latest dojo code, and it works. If you are having a problem with Dialog you need to build a reproducible test case, and open a new ticket, attaching the test case, like #10527 did.

comment:14 Changed 9 years ago by bill

(In [23458]) Test case doesn't require parser. Also fixing tabbing and upgrading to HTML5 DOCTYPE.

Refs #2238.

Note: See TracTickets for help on using tickets.