From: Matti Tahvonen Date: Thu, 21 Apr 2011 16:55:34 +0000 (+0000) Subject: fixes #6875 X-Git-Tag: 6.7.0.beta1~291 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9749d5107eeebc791908a820c6a0a7c02d08f1d6;p=vaadin-framework.git fixes #6875 svn changeset:18437/svn branch:6.6 --- 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) {