summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-03-12 15:56:38 +0200
committerJohn Ahlroos <john@vaadin.com>2013-03-12 15:59:25 +0200
commit28aa793d8ede78aef0b458d6362b1475288d6495 (patch)
treeec66479e1384bcc58f5232ba77c79a0eea4b0537 /client
parent0f3ac51ed4c34c9233463c1274c7107580faa1f9 (diff)
downloadvaadin-framework-28aa793d8ede78aef0b458d6362b1475288d6495.tar.gz
vaadin-framework-28aa793d8ede78aef0b458d6362b1475288d6495.zip
Added fallbacks for when IE10 reports width/height as 'auto' when getting the ComputedStyle #11308
Change-Id: I5cdf98feb8f5f92edeb253b259c354211bd5e369
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/Util.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java
index 2cd01b2dd8..049a689cb6 100644
--- a/client/src/com/vaadin/client/Util.java
+++ b/client/src/com/vaadin/client/Util.java
@@ -630,6 +630,10 @@ public class Util {
/*-{
var cs = element.ownerDocument.defaultView.getComputedStyle(element);
var heightPx = cs.height;
+ if(heightPx == 'auto'){
+ // Fallback for when IE reports auto
+ heightPx = @com.vaadin.client.Util::getRequiredHeightBoundingClientRect(Lcom/google/gwt/dom/client/Element;)(element) + 'px';
+ }
var borderTopPx = cs.borderTop;
var borderBottomPx = cs.borderBottom;
var paddingTopPx = cs.paddingTop;
@@ -646,6 +650,10 @@ public class Util {
/*-{
var cs = element.ownerDocument.defaultView.getComputedStyle(element);
var widthPx = cs.width;
+ if(widthPx == 'auto'){
+ // Fallback for when IE reports auto
+ widthPx = @com.vaadin.client.Util::getRequiredWidthBoundingClientRect(Lcom/google/gwt/dom/client/Element;)(element) + 'px';
+ }
var borderLeftPx = cs.borderLeft;
var borderRightPx = cs.borderRight;
var paddingLeftPx = cs.paddingLeft;