#9269 closed defect (duplicate)
dijit dialog modal underlayer issue
Reported by: | drewb | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.3.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I have a routine that queries for the time remaining until a user's session times out. When the session expires, a modal dialog allows the user to log back in via xhrPost.
There are other places where I use modal dialogs, and if one of those dialogs happens to be open when the session expires, I take care to hide it before showing the login dialog. (Once login is completed, I can re-show the original modal.)
This worked fine under dojo 1.2.3, but I'm noticing timing issues with 1.3.0. Specifically, most of the time, the modal underlayer does not display following one of these hide()-show() cycles. When it does display it often disappears after several seconds.
To sketch this out in code, imagine:
var dialog1 = new dijit.Dialog({ id : "d1", content : "hello from d1" }); var dialog2 = new dijit.Dialog({ id : "d2", content : "hello from d2" }); dialog1.show(); setTimeout(function(){ dialog1.hide(); dialog2.show(); }, 1000);
Inspecting the page will show that the modal underlay has "display: none;" set. Scrolling the window, or resizing makes the modal layer re-appear.
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Also, here's my work around (mind you, the setTimeout() above is only to allow a delay before the hide()-show() cycle)...
d1.hide(); setTimeout(function(){ dijit.byId("d2").show(); }, 500);
I couldn't go much below 1/2 second.
comment:3 Changed 12 years ago by
Component: | General → Dijit |
---|---|
Owner: | anonymous deleted |
comment:5 Changed 12 years ago by
Just an update for the original reporter... There is a possible patch pending that will allow you to leave your original dialog open and then just close your login dialog and continue where you left off... No promises yet, but if the patch goes through it could simplify your problem :)
comment:6 Changed 12 years ago by
#6759 was checked in, so you shouldn't need to hide the login dialog at all anymore. Hopefully that will workaround the race condition issue.
Here's code that actually works to demonstrate the issue (tested in both FF3/linux and IE7/xp):