From 04b87d89360fa9b62dc10f9d399eef07d2491d50 Mon Sep 17 00:00:00 2001 From: Henrik Paul Date: Mon, 23 Feb 2015 12:07:13 +0200 Subject: [PATCH] Fixes a graphical scrollbar glitch in Grid + some OSX configurations + Valo (#16565) Change-Id: I8eb8bb2d941fc88b9f896c8d351ada6286e8322d --- .../vaadin/client/widget/escalator/ScrollbarBundle.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/src/com/vaadin/client/widget/escalator/ScrollbarBundle.java b/client/src/com/vaadin/client/widget/escalator/ScrollbarBundle.java index ef8713b82f..e4924e9509 100644 --- a/client/src/com/vaadin/client/widget/escalator/ScrollbarBundle.java +++ b/client/src/com/vaadin/client/widget/escalator/ScrollbarBundle.java @@ -22,6 +22,7 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Display; import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.Unit; +import com.google.gwt.dom.client.Style.Visibility; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.HandlerManager; @@ -103,18 +104,20 @@ public abstract class ScrollbarBundle implements DeferredWorker { VERTICAL, HORIZONTAL; } - private class TemporaryResizer extends Object { + private class TemporaryResizer { private static final int TEMPORARY_RESIZE_DELAY = 1000; private final Timer timer = new Timer() { @Override public void run() { internalSetScrollbarThickness(1); + root.getStyle().setVisibility(Visibility.HIDDEN); } }; public void show() { internalSetScrollbarThickness(OSX_INVISIBLE_SCROLLBAR_FAKE_SIZE_PX); + root.getStyle().setVisibility(Visibility.VISIBLE); timer.schedule(TEMPORARY_RESIZE_DELAY); } } @@ -666,9 +669,11 @@ public abstract class ScrollbarBundle implements DeferredWorker { invisibleScrollbarTemporaryResizer.show(); } }); + root.getStyle().setVisibility(Visibility.HIDDEN); } else { Event.sinkEvents(root, 0); Event.setEventListener(root, null); + root.getStyle().clearVisibility(); } internalSetScrollbarThickness(Math.max(1d, px)); -- 2.39.5