Initial layout problem with GridLayout in FireFox 13.0.1

Hi,

I am having a sizing issue with a GridLayout nested in a VerticalLayout. Both the GridLayout and VerticalLayout are set to have size full.

On initial page load the GridLayout is “sometimes” not sized according to setSizeFull(). What is confusing is that the sizing issue does not occur upon every fresh page load for the example app shown below. This would indicate that my code is correct, as it does the correct thing sometimes, and that something under the hood is going wrong perhaps?

When the sizing issue does occur, if i resize the browser window even slightly, then the GridLayout immediately reverts to the correct behavior.

Note: I can only produce this odd behavior in FireFox 13.0.1. I have tested in Chrome version 23.0.1271.97 m and IE 9.0.8112.16421 and not experienced this issue at all.

My code is below…


public class FxUI extends UI {
	@Override
	protected void init(VaadinRequest request) {
		VerticalLayout vl = new VerticalLayout();
		vl.setSizeFull();
		GridLayout grid = new GridLayout(3, 3);
		grid.setSizeFull();
		vl.addComponent(grid);
		
		Label cell1 = new Label("cell 1");
		Label cell2 = new Label("cell 2");
		Label cell3 = new Label("cell 3");
		Label cell4 = new Label("cell 4");
		Label cell5 = new Label("cell 5");
		Label cell6 = new Label("cell 6");
		
		grid.addComponent(cell1, 0, 0, 1, 0);
		grid.addComponent(cell2, 2, 0);
		grid.addComponent(cell3, 0, 1, 0, 2);
		grid.addComponent(cell4, 1, 1);
		grid.addComponent(cell5, 2, 1);
		grid.addComponent(cell6, 1, 2, 2, 2);
		
		grid.setColumnExpandRatio(0, 1);
		grid.setColumnExpandRatio(1, 1);
		grid.setColumnExpandRatio(2, 1);
		grid.setRowExpandRatio(0, 1);
		grid.setRowExpandRatio(1, 1);
		grid.setRowExpandRatio(2, 1);

		setContent(vl);
	}
}

Any light you could shed on this problem would greatly appreciated. Thank you

Stacey

I forgot to mention, i am using vaadin 7 beta 10 with Java 1.6