diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-11-24 15:32:49 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-11-24 13:57:35 +0000 |
commit | 48049ced5414a5df1b268f84d8240c91363026c4 (patch) | |
tree | d35243c5bdc71cdb749713236b91ea2af21b10dd /client | |
parent | 6e4ce712ecebe0c8f012a119db07de0e5ff3c740 (diff) | |
download | vaadin-framework-48049ced5414a5df1b268f84d8240c91363026c4.tar.gz vaadin-framework-48049ced5414a5df1b268f84d8240c91363026c4.zip |
Add comment explaining the dummy read in setStyleTemporarily
Change-Id: I763f3c68a3c9e471f9e5df21bbfbce41be17117c
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/WidgetUtil.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/WidgetUtil.java b/client/src/com/vaadin/client/WidgetUtil.java index b0e0030769..a861c6d8f6 100644 --- a/client/src/com/vaadin/client/WidgetUtil.java +++ b/client/src/com/vaadin/client/WidgetUtil.java @@ -995,9 +995,12 @@ public class WidgetUtil { final String currentValue = style.getProperty(styleProperty); style.setProperty(styleProperty, tempValue); + + // Read a style-based property to force the browser to recalculate the + // element's dimensions with the temporary style. element.getOffsetWidth(); - style.setProperty(styleProperty, currentValue); + style.setProperty(styleProperty, currentValue); } /** |