PDA

View Full Version : FormPanel fields flicker when collapsing ContentPanel in RowLayout (FF only)



VadimV1144
9 Feb 2011, 8:44 AM
GXT 2.2.1 , GWT 2.1.0, FireFox 3.6.13

When collapsing the ContentPanel in FireFox, the fields flicker - move to the right and then back to the left.



@Override
public void onModuleLoad() {
LayoutContainer lc = new LayoutContainer(new RowLayout(Style.Orientation.VERTICAL));
lc.setWidth(300);
ContentPanel cp = new ContentPanel(new FlowLayout());
cp.setHeaderVisible(true);
cp.setCollapsible(true);

final FormPanel lc2 = new FormPanel();
TextField<String> txt = new TextField<String>();
txt.setFieldLabel("Test");
lc2.add(txt, new FormData("95%"));

cp.add(lc2);
lc.add(cp, new RowData(1,-1));

RootPanel.get().add(lc);
}

VadimV1144
12 Feb 2011, 4:57 AM
Any thoughts on why this is happening or how to fix this?

Also this is happening in both hosted and non hosted modes.
Here is a better version of the code - it adds 45 fields so it is easier to see the issue:


@Override
public void onModuleLoad() {
LayoutContainer lc = new LayoutContainer(new RowLayout(Style.Orientation.VERTICAL));
lc.setWidth(300);
ContentPanel cp = new ContentPanel(new FlowLayout());
cp.setHeaderVisible(true);
cp.setCollapsible(true);

final FormPanel lc2 = new FormPanel();
for(Integer i = 0; i < 45; i++){
TextField<String> txt = new TextField<String>();
txt.setFieldLabel("Test - " + i.toString());
lc2.add(txt, new FormData("95%"));
}

cp.add(lc2);
lc.add(cp, new RowData(1,-1));

RootPanel.get().add(lc);
}