Opened 12 years ago

Closed 12 years ago

#3798 closed defect (invalid)

ContentBox - Getting width and height of a hidden element?

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Not sure whether this should be an enhancement or a defect,

I've just starting playing with 0.9 and there seems to be a lot widgets using dojo.contentBox, the problem is hidden elements return a height of 0. This is correct but can cause problems for some widgets.

Is there a function in dojo that allows getting the width and height of an element "as if it were not hidden"?

I'll an attach an example / test case of the problem for the progressBar

Attachments (1)

test_progressBar.patch (726 bytes) - added by guest 12 years ago.
Usage of dojo.ContentBox? on ProgressBar? doesn't provide expected result when contained in hidden block

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by guest

Attachment: test_progressBar.patch added

Usage of dojo.ContentBox? on ProgressBar? doesn't provide expected result when contained in hidden block

comment:1 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

As for ProgressBar?, #2803 has been filed to remove javascript sizing from that widget (for this reason). Actually none of the form widgets should do javascript sizing. The layout widgets do javascript sizing, but they should never be hidden, except for the hidden tabs in a TabContainer/StackContainer?/etc., but those cases are also handled correctly because we don't do sizing until the content is visible.

So we aren't planning to make the change the way dojo.contentBox() works, but it shouldn't cause an issue for the widgets, as per description above.

Note: See TracTickets for help on using tickets.