&& (getOperatingSystemMajorVersion() == 3 || getOperatingSystemMajorVersion() == 4);
}
+ public boolean isAndroid23() {
+ return isAndroid() && getOperatingSystemMajorVersion() == 2
+ && getOperatingSystemMinorVersion() == 3;
+ }
+
private int getOperatingSystemMajorVersion() {
return browserDetails.getOperatingSystemMajorVersion();
}
+ private int getOperatingSystemMinorVersion() {
+ return browserDetails.getOperatingSystemMinorVersion();
+ }
+
/**
* Returns the browser major version e.g., 3 for Firefox 3.5, 4 for Chrome
* 4, 8 for Internet Explorer 8.
private void setContainerHeight() {
if (!isDynamicHeight()) {
+
+ /*
+ * Android 2.3 cannot measure the height of the inline-block
+ * properly, and will return the wrong offset height. So for android
+ * 2.3 we set the element to a block element while measuring and
+ * then restore it which yields the correct result. #11331
+ */
+ if (BrowserInfo.get().isAndroid23()) {
+ getElement().getStyle().setDisplay(Display.BLOCK);
+ }
+
containerHeight = getOffsetHeight();
containerHeight -= showColHeaders ? tHead.getOffsetHeight() : 0;
containerHeight -= tFoot.getOffsetHeight();
if (containerHeight < 0) {
containerHeight = 0;
}
+
scrollBodyPanel.setHeight(containerHeight + "px");
+
+ if (BrowserInfo.get().isAndroid23()) {
+ getElement().getStyle().clearDisplay();
+ }
}
}