View Full Version : [CLOSED] ST2 pr2 container.getHeight() always returns 'null'

25 Nov 2011, 1:56 AM
I don't know for sure if I've found a bug, but seems like the internal value _height is not set?

Try this to reproduce the problem locally:

Ext.Viewport.add(Ext.create('Ext.Container', {itemId: 'zomg'}));
I was hoping that if the element is missing the height property in the constructor, it might as well default to return the element's dom height as rendered, e.g.:


25 Nov 2011, 9:46 AM
Thank you for the report.

Jamie Avins
28 Nov 2011, 9:52 AM
As the size can change at any time if not set, I don't think returning this as a default is proper.

29 Nov 2011, 2:31 AM
Makes sense in this way. Maybe this bit of explanation could go into the docs? Let users know they can access dom height thru


Jamie Avins
29 Nov 2011, 8:55 AM
More than that, it needs to be measured with the help of Ext.util.SizeMonitor so you know when to make measurements. There will be a guide on it.