refreshing page causes size-full components grow out of containing window

With code similar to the following, I got problem with page refresh.


Window dialog = new Window();
ComponentContainer container = dialog.getContent();
container.setSizeFull();

/*
 * attach the sub window
 */
Window mainWindow = ...;
mainWindow.addWindow(dialog);

HorizontalLayout content = new HorizontalLayout();
content.setSizeFull();

container.addComponent(content);

Every time the page is refreshed, the content of a sub window will grow outside. A manual resize can make it back into its container.

Please see the attached screenshot.
11548.png

Hi,

I tried to reproduce the problem with your code but at least Firefox 3.6 and Chrome 8 work like expected. Which browser and Vaadin version are you using?

-Henri

Hi Henri,

Sorry for the incomplete code and my late response. I’ve made a test app to reproduce the issue with Vaadin 6.4.8, both Firefox 3.6.13 and Chrome 8.0.552.224.

I found it was caused by the chameleon theme. Anyway, here is the init method of my Application sub class. Comment out the setTheme method, and everything goes fine.

@Override
	public void init() {

		setTheme("chameleon");

		Window mainWindow = new Window();
		setMainWindow(mainWindow);

		Window dialog = new Window();
		mainWindow.addWindow(dialog);

		dialog.setCaption("xxx");
		dialog.setClosable(false);
		dialog.setWidth("600px");

		ComponentContainer container = dialog.getContent();
		container.setSizeFull();

		HorizontalLayout content = new HorizontalLayout();
		content.setSizeFull();

		Panel panel1 = new Panel("panel 1");
		panel1.setSizeFull();

		Panel panel2 = new Panel("panel 2");
		panel2.setSizeFull();

		content.addComponent(panel1);
		content.addComponent(panel2);

		container.addComponent(content);

		return;
	}

btw.
Merry Christmas!

Hi,

Could you please create a ticket for this issue at dev.vaadin.com (New Ticket → Component: Chameleon theme), so we’ll remember to fix it at some point. Thanks!

Done! Here goes the ticket,
ticket:6216