PDA

View Full Version : [FIXED-158][3.0.0] Menu should check for existence of doAutoSize



stever
18 Aug 2009, 3:25 PM
If you are not using the menu layout in a menu (crazy!), you end up with errors since it assumes that there is a doAutoSize function in all layouts.

Menu.js showAt():

if(Ext.isIE ){
this.layout.doAutoSize();
if(!Ext.isIE8){
this.el.repaint();
}
}

should be (or similar):


if(Ext.isIE && Ext.isFunction(this.layout.doAutoSize)){
this.layout.doAutoSize();
if(!Ext.isIE8){
this.el.repaint();
}
}

Animal
19 Aug 2009, 9:12 AM
Not that crazy right now.

Menu may be used as a "vehicle" for popup displays.

With BoxComponent not having the machinery for absolute positioning, z-index management, constraining etc, then the best Component to put popup Components in is a Menu.

This is why DatePicker and ColorPicker wrap themselves in a Menu.

When/if BoxComponent gets floatability, then having Menu able to accomodate and lay out other structures will be a bit crazy.

stever
19 Aug 2009, 9:18 AM
Yeah, but at the moment, I have to patch Ext to allow other layouts in a menu, even other Ext provided layouts.

I patched a long time ago, but a change in Menu.js caused an SVN conflict in my copy, so I try and take the time to explain them when those conflicts come up so my patches can move up into Ext's source.

evant
19 Aug 2009, 11:31 PM
Fixed in SVN.

Animal
20 Aug 2009, 12:02 AM
There's a console.log statement left in the code.