updateShadowSizeAndPosition();
+ boolean sizeReduced = false;
// ensure window is not larger than browser window
if (getOffsetWidth() > Window.getClientWidth()) {
setWidth(Window.getClientWidth() + "px");
+ sizeReduced = true;
}
if (getOffsetHeight() > Window.getClientHeight()) {
setHeight(Window.getClientHeight() + "px");
+ sizeReduced = true;
}
if (dynamicHeight && layoutRelativeHeight) {
client.updateVariable(id, "width", w, true);
}
+ if (sizeReduced) {
+ // If we changed the size we need to update the size of the child
+ // component if it is relative (#3407)
+ client.runDescendentsLayout(this);
+ }
+
Util.runWebkitOverflowAutoFix(contentPanel.getElement());
}
--- /dev/null
+package com.vaadin.tests.components.window;\r
+\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.NativeButton;\r
+import com.vaadin.ui.Window;\r
+\r
+public class ExtraLargeSubWindow extends TestBase {\r
+\r
+ @Override\r
+ protected void setup() {\r
+ Window w = new Window("full sized window");\r
+ w.setWidth("2000px");\r
+ w.setHeight("2000px");\r
+ w.getContent().setSizeFull();\r
+ NativeButton b = new NativeButton("A large button");\r
+ b.setSizeFull();\r
+ w.addComponent(b);\r
+\r
+ getMainWindow().addWindow(w);\r
+ }\r
+\r
+ @Override\r
+ protected String getDescription() {\r
+ return "A 100%x100% sub window should not produce scrollbars in the main view or in the sub window. The button inside the sub window is 100%x100%, as is the layout";\r
+ }\r
+\r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return 3407;\r
+ }\r
+\r
+}\r