From: Henrik Paul Date: Tue, 18 Mar 2014 14:20:22 +0000 (+0200) Subject: Fixes a few Escalator regressions relating to IE8 and IE9 (#13334) X-Git-Tag: 7.4.0.alpha1~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=27e65d32145f0010f5cb459d4032209e33166a23;p=vaadin-framework.git Fixes a few Escalator regressions relating to IE8 and IE9 (#13334) Change-Id: I3446d1f781f5aa5e3262a20f51999b0a52d48dd3 --- diff --git a/WebContent/VAADIN/themes/base/escalator/escalator.scss b/WebContent/VAADIN/themes/base/escalator/escalator.scss index 6f85a541ee..c6438ac9cc 100644 --- a/WebContent/VAADIN/themes/base/escalator/escalator.scss +++ b/WebContent/VAADIN/themes/base/escalator/escalator.scss @@ -67,15 +67,18 @@ $border-color: #aaa; .#{$primaryStyleName}-row { display: block; - .v-ie8 & { - /* IE8 doesn't let table rows be longer than body only with display block. Moar hax. */ + .v-ie8 &, .v-ie9 & { + /* + * Neither IE8 nor IE9 let table rows be longer than tbody, with only + * "display: block". Moar hax. + */ float: left; clear: left; /* - * The inline style of margin-top from the to offset the header's dimension is, - * for some strange reason, inherited into each contained . - * We need to cancel it: + * The inline style of margin-top from the to offset the + * header's dimension is, for some strange reason, inherited into each + * contained . We need to cancel it: */ margin-top: 0; } diff --git a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java index 1f637a9ccc..3f387abfef 100644 --- a/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java +++ b/client/src/com/vaadin/client/ui/grid/ScrollbarBundle.java @@ -312,7 +312,7 @@ abstract class ScrollbarBundle { * the length of the scrollbar in pixels */ public final void setOffsetSize(double px) { - internalSetOffsetSize(truncate(px)); + internalSetOffsetSize(Math.max(0, truncate(px))); forceScrollbar(showsScrollHandle()); recalculateMaxScrollPos(); fireVisibilityChangeIfNeeded(); @@ -360,7 +360,7 @@ abstract class ScrollbarBundle { * large numbers (as of today, 25.3.2014). This double-ranged is * only facilitating future virtual scrollbars. */ - internalSetScrollPos(toInt32(px)); + internalSetScrollPos(toInt32(scrollPos)); } } @@ -445,7 +445,7 @@ abstract class ScrollbarBundle { * through */ public final void setScrollSize(double px) { - internalSetScrollSize(toInt32(truncate(px))); + internalSetScrollSize(toInt32(Math.max(0, truncate(px)))); forceScrollbar(showsScrollHandle()); recalculateMaxScrollPos(); fireVisibilityChangeIfNeeded(); @@ -485,7 +485,7 @@ abstract class ScrollbarBundle { */ public final void setScrollbarThickness(int px) { isInvisibleScrollbar = (px == 0); - internalSetScrollbarThickness(px != 0 ? px + internalSetScrollbarThickness(px != 0 ? Math.max(0, px) : OSX_INVISIBLE_SCROLLBAR_FAKE_SIZE_PX); } @@ -572,7 +572,6 @@ abstract class ScrollbarBundle { } } - /** * Converts a double into an integer by JavaScript's terms. *