summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index fbfae78ac5..7b013f8d87 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -76,10 +76,7 @@ import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.ResizeComposite;
import com.google.gwt.user.client.ui.Widget;
-import com.vaadin.client.BrowserInfo;
-import com.vaadin.client.DeferredWorker;
-import com.vaadin.client.Focusable;
-import com.vaadin.client.WidgetUtil;
+import com.vaadin.client.*;
import com.vaadin.client.WidgetUtil.Reference;
import com.vaadin.client.data.DataChangeHandler;
import com.vaadin.client.data.DataSource;
@@ -3342,6 +3339,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
*/
private class AutoColumnWidthsRecalculator {
private double lastCalculatedInnerWidth = -1;
+ private double lastCalculatedInnerHeight = -1;
private final ScheduledCommand calculateCommand = new ScheduledCommand() {
@@ -3434,6 +3432,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
// Update latest width to prevent recalculate on height change.
lastCalculatedInnerWidth = escalator.getInnerWidth();
+ lastCalculatedInnerHeight = getEscalatorInnerHeight();
}
private boolean columnsAreGuaranteedToBeWiderThanGrid() {
@@ -9146,6 +9145,10 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
recalculateColumnWidths();
}
+ if (getEscalatorInnerHeight() != autoColumnWidthsRecalculator.lastCalculatedInnerHeight) {
+ resetSizesFromDom();
+ }
+
// Vertical resizing could make editor positioning invalid so it
// needs to be recalculated on resize
if (isEditorActive()) {
@@ -9159,6 +9162,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
});
}
+ private double getEscalatorInnerHeight() {
+ return new ComputedStyle(getEscalator().getTableWrapper())
+ .getHeightIncludingBorderPadding();
+ }
+
/**
* Grid does not support adding Widgets this way.
* <p>