]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes a graphical scrollbar glitch in Grid + some OSX configurations + Valo (#16565)
authorHenrik Paul <henrik@vaadin.com>
Mon, 23 Feb 2015 10:07:13 +0000 (12:07 +0200)
committerVaadin Code Review <review@vaadin.com>
Mon, 23 Feb 2015 11:01:14 +0000 (11:01 +0000)
Change-Id: I8eb8bb2d941fc88b9f896c8d351ada6286e8322d

client/src/com/vaadin/client/widget/escalator/ScrollbarBundle.java

index ef8713b82f3bc59193bd7410df5689eefbea12bb..e4924e9509bd76c11b0ea2820df58aebd3f53dbc 100644 (file)
@@ -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));