summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VForm.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VForm.java b/src/com/vaadin/terminal/gwt/client/ui/VForm.java
index 7debc5fe9b..18e0a3790d 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VForm.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VForm.java
@@ -300,9 +300,9 @@ public class VForm extends ComplexPanel implements Container, KeyDownHandler {
@Override
public void setWidth(String width) {
- if (borderPaddingHorizontal < 0) {
+ if (borderPaddingHorizontal < 0 && desc.hasParentElement()) {
// measure excess size lazily after stylename setting, but before
- // setting width
+ // setting width if description is attached
int ow = getOffsetWidth();
int dow = desc.getOffsetWidth();
borderPaddingHorizontal = ow - dow;