Opened 6 years ago

Closed 6 years ago

#17268 closed defect (invalid)

dijit/layout/StackContainer sized incorrectly in reused dijit/Dialog

Reported by: Jason Cowley Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.9.0
Keywords: Cc:
Blocked By: Blocking:

Description

I am in the process of upgrading our application from Dojo 1.8.2 to Dojo 1.9.0 and I have run into a problem with many of our dialog boxes where the content of the dialog is no longer showing up. It appears to be affecting all dialogs that contain either a dijit/layout/StackContainer or a dijit/layout/TabContainer. It seems that the problem is with us reusing the Dialog instance, while only changing its content

I have put together a simple test page that demonstrates the problem. The attached file uses Dojo 1.8.2. If you open it in a browser, a dialog box is displayed, and then hidden immediately. The content of the dialog is then changed so that it contains a StackContainer?, then it is redisplayed again. This works fine with 1.8.2.

If you edit the file to comment out the Dojo 1.8.2 styles and script, then uncomment the Dojo 1.9.0 lines, the example no longer works. The StackContainer? is given a height of 0px. I believe this is the same problem we are seeing through out application.

Any help is appreciated. Cheers!

Attachments (1)

test_DialogAndStackContainer.html (2.6 KB) - added by Jason Cowley 6 years ago.
Test page that reproduces the problem.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by Jason Cowley

Test page that reproduces the problem.

comment:1 Changed 6 years ago by bill

Resolution: invalid
Status: newclosed

I reproduce the problem, and I see that your test file stopped working starting with f3e8c30b8839e5ff4ddd78bdf4a9f9c8536aeb26.

The thing is though that you're supposed to set a size on the StackContainer?, rather than setting a size on the Dialog. Your code happened to work in 1.8, but that was just getting lucky. You need to set a style (both width and height) on the StackContainer?.

Note: See TracTickets for help on using tickets.