summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2014-12-15 13:45:54 +0200
committerVaadin Code Review <review@vaadin.com>2014-12-15 14:38:12 +0000
commit5adb3a54059d7f43b8a49bce5627ee8d2c825867 (patch)
tree3bcdde66664044493785dcad14f59fe7838704d2 /client/src
parentfd2414084d4d391f5cd680383081d8d930735aca (diff)
downloadvaadin-framework-5adb3a54059d7f43b8a49bce5627ee8d2c825867.tar.gz
vaadin-framework-5adb3a54059d7f43b8a49bce5627ee8d2c825867.zip
Fix IE8 exceptions when setting width to negative value (#13334)
Change-Id: Ib0e2c2aa36568473d8aa98b53832128133127263
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/widget/escalator/FlyweightCell.java4
-rw-r--r--client/src/com/vaadin/client/widgets/Escalator.java12
2 files changed, 12 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java b/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java
index 031511115c..42fa245e59 100644
--- a/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java
+++ b/client/src/com/vaadin/client/widget/escalator/FlyweightCell.java
@@ -108,7 +108,9 @@ public class FlyweightCell {
+ row.getRow() + " doesn't exist in the DOM!";
e.setPropertyInt(COLSPAN_ATTR, 1);
- e.getStyle().setWidth(row.getColumnWidth(column), Unit.PX);
+ if (row.getColumnWidth(column) >= 0) {
+ e.getStyle().setWidth(row.getColumnWidth(column), Unit.PX);
+ }
e.getStyle().clearDisplay();
setElement(e);
}
diff --git a/client/src/com/vaadin/client/widgets/Escalator.java b/client/src/com/vaadin/client/widgets/Escalator.java
index d598be61a4..a696906902 100644
--- a/client/src/com/vaadin/client/widgets/Escalator.java
+++ b/client/src/com/vaadin/client/widgets/Escalator.java
@@ -1556,8 +1556,12 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker
final double colWidth) {
final TableCellElement cellElem = TableCellElement.as(DOM
.createElement(getCellElementTagName()));
- cellElem.getStyle().setHeight(height, Unit.PX);
- cellElem.getStyle().setWidth(colWidth, Unit.PX);
+ if (height >= 0) {
+ cellElem.getStyle().setHeight(height, Unit.PX);
+ }
+ if (colWidth >= 0) {
+ cellElem.getStyle().setWidth(colWidth, Unit.PX);
+ }
cellElem.addClassName(getStylePrimaryName() + "-cell");
return cellElem;
}
@@ -1790,7 +1794,9 @@ public class Escalator extends Widget implements RequiresResize, DeferredWorker
com.google.gwt.dom.client.Element row = root.getFirstChildElement();
while (row != null) {
- row.getStyle().setWidth(rowWidth, Unit.PX);
+ if (rowWidth >= 0) {
+ row.getStyle().setWidth(rowWidth, Unit.PX);
+ }
row = row.getNextSiblingElement();
}
}