summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@itmill.com>2011-02-24 12:07:14 +0000
committerHenri Sara <henri.sara@itmill.com>2011-02-24 12:07:14 +0000
commitb1cd58ec2cac32e07d97469c41159c549d3d01cf (patch)
tree7a8087e64daf0d5dc2865f20c5f53703b19285c8 /src
parent07c08d6e9a624684f7839b2e3b3d8bad0c4eecd7 (diff)
downloadvaadin-framework-b1cd58ec2cac32e07d97469c41159c549d3d01cf.tar.gz
vaadin-framework-b1cd58ec2cac32e07d97469c41159c549d3d01cf.zip
#6496 Close error notification with keyboard (Escape)
svn changeset:17431/svn branch:6.5
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VNotification.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNotification.java b/src/com/vaadin/terminal/gwt/client/ui/VNotification.java
index 7e7ccf1791..bc0b0367bd 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.event.dom.client.KeyCodes;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Event;
@@ -255,6 +256,10 @@ public class VNotification extends VOverlay {
fade();
return false;
}
+ } else if (type == Event.ONKEYDOWN
+ && event.getKeyCode() == KeyCodes.KEY_ESCAPE) {
+ fade();
+ return false;
}
if (temporaryStyle == STYLE_SYSTEM) {
return true;