From 9749d5107eeebc791908a820c6a0a7c02d08f1d6 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 21 Apr 2011 16:55:34 +0000 Subject: [PATCH] fixes #6875 svn changeset:18437/svn branch:6.6 --- .../vaadin/terminal/gwt/client/ui/VNotification.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNotification.java b/src/com/vaadin/terminal/gwt/client/ui/VNotification.java index bc0b0367bd..f0438700fd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VNotification.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VNotification.java @@ -9,6 +9,7 @@ import java.util.Date; import java.util.EventObject; import java.util.Iterator; +import com.google.gwt.core.client.Scheduler; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; @@ -50,6 +51,7 @@ public class VNotification extends VOverlay { private String temporaryStyle; private ArrayList listeners; + private static final int TOUCH_DEVICE_IDLE_DELAY = 1000; public VNotification() { setStyleName(STYLENAME); @@ -60,6 +62,15 @@ public class VNotification extends VOverlay { public VNotification(int delayMsec) { this(); this.delayMsec = delayMsec; + if(BrowserInfo.get().isTouchDevice()) { + new Timer(){ + @Override + public void run() { + if(isAttached()) { + fade(); + } + }}.schedule(delayMsec + TOUCH_DEVICE_IDLE_DELAY ); + } } public VNotification(int delayMsec, int fadeMsec, int startOpacity) { -- 2.39.5