summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-02-14 15:41:45 +0200
committerVaadin Code Review <review@vaadin.com>2013-02-18 12:40:57 +0000
commit41e1a013d829f75c0bdadea40ec0b42429e2a581 (patch)
tree7298dc5bad5b417896bc526627ff3d7a11e7cf7c /client
parentf759408c0fa75cc1610b6a598737bf4eec039104 (diff)
downloadvaadin-framework-41e1a013d829f75c0bdadea40ec0b42429e2a581.tar.gz
vaadin-framework-41e1a013d829f75c0bdadea40ec0b42429e2a581.zip
Interim fix for resizing of child component in AbsoluteLayout when child is 100% and layout resized (no-merge) #10427
Change-Id: I497ecc1ac88ef1b3c07d127aff3c157827088e01
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VAbsoluteLayout.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java
index 92a51f209d..88fbae6e88 100644
--- a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java
+++ b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java
@@ -326,6 +326,10 @@ public class VAbsoluteLayout extends ComplexPanel {
Style wrapperStyle = wrapper.getElement().getStyle();
Style widgetStyle = wrapper.getWidget().getElement().getStyle();
+
+ // Ensure previous heights do not affect the measures
+ wrapperStyle.clearHeight();
+
if (widgetStyle.getHeight() != null
&& widgetStyle.getHeight().endsWith("%")) {
int h;
@@ -343,8 +347,6 @@ public class VAbsoluteLayout extends ComplexPanel {
- wrapper.getElement().getOffsetTop();
}
wrapperStyle.setHeight(h, Unit.PX);
- } else {
- wrapperStyle.clearHeight();
}
wrapper.updateCaptionPosition();
@@ -380,6 +382,9 @@ public class VAbsoluteLayout extends ComplexPanel {
Style wrapperStyle = wrapper.getElement().getStyle();
Style widgetStyle = wrapper.getWidget().getElement().getStyle();
+ // Ensure previous heights do not affect the measures
+ wrapperStyle.clearWidth();
+
if (widgetStyle.getWidth() != null
&& widgetStyle.getWidth().endsWith("%")) {
int w;
@@ -398,8 +403,6 @@ public class VAbsoluteLayout extends ComplexPanel {
- wrapper.getElement().getOffsetLeft();
}
wrapperStyle.setWidth(w, Unit.PX);
- } else {
- wrapperStyle.clearWidth();
}
wrapper.updateCaptionPosition();