PDA

View Full Version : CenterLayout goes funky in newest builds of chrome



harrylepotter
28 Mar 2011, 10:56 PM
Hey Devs,

There appears to be a bug in GXT 2.1.1 With com.extjs.gxt.ui.client.widget.layout.CenterLayout. Layout appears to be centered verically, but no longer horizontally...
Bug didn't occur with chrome < 10, or other webkit browsers such as Safari.


We resolved it by avoiding the call to callLayout() on line 29: ie:


@Override
protected void onLayout(Container<?> container, El target) {
super.onLayout(container, target);
Component c = container.getItem(0);
if (c != null) {

if(!GXT.isChrome){
callLayout(c, false);
}

Point p = c.el().getAlignToXY(target.dom, "c-c", null);
p = c.el().translatePoints(p);
setPosition(c, p.x, p.y);

}
}