Collapse() b4 attachForm(): inputWidth for combo is broken

Hello,

Please check the following simple code:

[code]









[/code]

If you call collapse() before attachForm() and then expand() the cell back, it will break the inputWidth for combo item while input will be displayed correctly.

Is this expected behavior?

Thanks.

Hi

a bit, form has inner mechanism to set correct width to element including paddings/margins (we cal it dimFix), so while this code performed attrs like offsetWidth are used, but offsetWidth is 0 if parent’s display is set to “none”.

I recommend you init form once on demand, like this:

var myForm; var formEv = myLayout.attachEvent("onExpand", function(name){ if (name == "b" && myForm == null) { myForm = myLayout.cells(name).attachForm(...); myLayout.detachEvent(formEv); } });