diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-29 13:17:57 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2014-12-29 13:17:57 +0200 |
commit | 0d93598759d2a1a95a25cc84e75cfa03f154590e (patch) | |
tree | c51fc6647ff4a99705cf96499008dc529148c997 /client/src/com/vaadin | |
parent | 0937a50c9d99ca585cbc3e27fbfe3cbf7822f26e (diff) | |
download | vaadin-framework-0d93598759d2a1a95a25cc84e75cfa03f154590e.tar.gz vaadin-framework-0d93598759d2a1a95a25cc84e75cfa03f154590e.zip |
Fix Grid columns being too narrow on IE9 (#15475)
Change-Id: Ifb46093ffb43a4fa03b051719f3480ef469b460e
Diffstat (limited to 'client/src/com/vaadin')
-rw-r--r-- | client/src/com/vaadin/client/widgets/Escalator.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java index 74fb28bbd2..57c55d457d 100644 --- a/client/src/com/vaadin/client/widgets/Escalator.java +++ b/client/src/com/vaadin/client/widgets/Escalator.java @@ -50,6 +50,7 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.RequiresResize; import com.google.gwt.user.client.ui.UIObject; import com.google.gwt.user.client.ui.Widget; +import com.vaadin.client.BrowserInfo; import com.vaadin.client.DeferredWorker; import com.vaadin.client.Profiler; import com.vaadin.client.Util; @@ -63,6 +64,7 @@ import com.vaadin.client.widget.escalator.PositionFunction.AbsolutePosition; import com.vaadin.client.widget.escalator.PositionFunction.Translate3DPosition; import com.vaadin.client.widget.escalator.PositionFunction.TranslatePosition; import com.vaadin.client.widget.escalator.PositionFunction.WebkitTranslate3DPosition; +import com.vaadin.client.widget.escalator.Row; import com.vaadin.client.widget.escalator.RowContainer; import com.vaadin.client.widget.escalator.RowVisibilityChangeEvent; import com.vaadin.client.widget.escalator.RowVisibilityChangeHandler; @@ -2009,9 +2011,19 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker cellClone.getStyle().clearWidth(); rowElement.insertBefore(cellClone, cellOriginal); - maxCellWidth = Math.max(Util - .getRequiredWidthBoundingClientRectDouble(cellClone), - maxCellWidth); + double requiredWidth = Util + .getRequiredWidthBoundingClientRectDouble(cellClone); + + if (BrowserInfo.get().isIE9()) { + /* + * IE9 does not support subpixels. Usually it is rounded + * down which leads to content not shown. Increase the + * counted required size by one just to be on the safe side. + */ + requiredWidth += 1; + } + + maxCellWidth = Math.max(requiredWidth, maxCellWidth); cellClone.removeFromParent(); } |