28 Oct 2011 1:34 PM #1
User-triggered window resize required to force correct layout of container hierarchy
I've noticed a number of scenarios in which a view comes up initially blank - or if not completely blank, with much of its content missing. The display is fixed the first time I resize the window. I haven't debugged in detail, but it appears that in such cases, the width and/or height properties of parent containers aren't getting set during the initial layout, with the result that overflowing child components are hidden.
28 Oct 2011 2:22 PM #2
I haven't seen that behavior before, but your guess as to the root cause certainly fits the symptoms. Any chance that can be reproduced in a small example?
31 Oct 2011 5:07 AM #3
Although it happens on a number of screens, the application is large and complex, and I haven't yet been able to isolate a small test case. Will post if I do...
This may be unrelated, but I also get a number of exceptions from the following line in Ext.layout.component.Component.beginLayoutCycle:
ownerContext.setWidth(me.lastComponentSize.width, false, true);
31 Oct 2011 9:11 AM #4
The root cause of this exception is improper "scoping" of the layout. While it is tempting to add a null check and default in some values, that will just produce a garbage layout result...
When a component is told to layout, if a dimension is calculated by its ownerLayout (width/heightAuthority==2), but the ownerLayout is not in scope for this run ("isTopLevel") then we pull the size information from the last layout run ("lastComponentSize"). If the component has never been sized, it will not have a "lastComponentSize" and so the layout scope *must* include its ownerLayout... sadly if "lastComponentSize" is null in this case, then this requirement is being violated.
Thanks for digging in on the build - much appreciated.
31 Oct 2011 9:16 AM #5
Thanks. I appreciate the explanation.
10 Dec 2011 1:21 AM #6
I am getting the error "me.lastComponentSize is undefined" in FireFox and "TypeError: Cannot convert 'me.lastComponentSize' to object" in Opera.
It works great in Safari and Chrome.
Will this be fixed for the next release?
10 Dec 2011 3:13 PM #7