From fc2ef4bdc853ae67f245a77252958c43c0b9dce8 Mon Sep 17 00:00:00 2001
From: Artur Signell <artur@vaadin.com>
Date: Tue, 1 Sep 2015 21:45:50 +0300
Subject: Fix resetting of top or left alignment in GridLayout (#18660)

Change-Id: I12b4d792f4d7cc7e3340d5566fda55f0cb23cbd0
---
 client/src/com/vaadin/client/ui/layout/VLayoutSlot.java | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'client/src')

diff --git a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java
index f308d07673..bc0c6739bb 100644
--- a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java
+++ b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java
@@ -149,6 +149,8 @@ public abstract class VLayoutSlot {
             if (captionAboveCompnent) {
                 captionStyle.setLeft(0, Unit.PX);
             }
+            // Reset left when changing back to align left
+            widget.getElement().getStyle().clearLeft();
         }
 
     }
@@ -212,6 +214,10 @@ public abstract class VLayoutSlot {
             padding += captionHeight;
 
             widget.getElement().getStyle().setTop(padding, Unit.PX);
+        } else {
+            // Reset top when changing back to align top
+            widget.getElement().getStyle().clearTop();
+
         }
     }
 
-- 
cgit v1.2.3