Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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:


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"

}, 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 13 years ago by drewb

Here's code that actually works to demonstrate the issue (tested in both FF3/linux and IE7/xp):

  var d1 = new dijit.Dialog({id: "d1", content: "foo"});
  var d2 = new dijit.Dialog({id: "d2", content: "bar"});;
  setTimeout(function(){ dijit.byId("d1").hide(); dijit.byId("d2").show(); }, 6000);

comment:2 Changed 13 years ago by drewb

Also, here's my work around (mind you, the setTimeout() above is only to allow a delay before the hide()-show() cycle)...

setTimeout(function(){ dijit.byId("d2").show(); }, 500);

I couldn't go much below 1/2 second.

comment:3 Changed 13 years ago by Adam Peller

Component: GeneralDijit
Owner: anonymous deleted

comment:4 Changed 13 years ago by bill

Resolution: duplicate
Status: newclosed

Dup of #2238.

comment:5 Changed 13 years ago by Karl Tiedt

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 13 years ago by bill

#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.

Note: See TracTickets for help on using tickets.