diff options
author | patrik <patrik@vaadin.com> | 2015-08-06 14:08:38 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-08-28 07:22:24 +0000 |
commit | 1d36db6d112c818a9c75e7cd10eb6b3519119406 (patch) | |
tree | 107d6b67a75216dc5adca0833d90049751807fd3 /client | |
parent | c6622ac5cbf4ddbcec35e02f92f74cf46d147e71 (diff) | |
download | vaadin-framework-1d36db6d112c818a9c75e7cd10eb6b3519119406.tar.gz vaadin-framework-1d36db6d112c818a9c75e7cd10eb6b3519119406.zip |
Add better keyboard Close Shortcut API for Window (#17383)
Change-Id: I29c7d288fe35f6801cf3576ba06751adce821340
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VWindow.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index e34e12a20b..2d2d6ecee1 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -44,8 +44,6 @@ import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.event.dom.client.KeyDownHandler; -import com.google.gwt.event.dom.client.KeyUpEvent; -import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.event.dom.client.ScrollEvent; import com.google.gwt.event.dom.client.ScrollHandler; import com.google.gwt.event.shared.HandlerRegistration; @@ -79,8 +77,7 @@ import com.vaadin.shared.ui.window.WindowRole; * @author Vaadin Ltd */ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, - ScrollHandler, KeyDownHandler, KeyUpHandler, FocusHandler, BlurHandler, - Focusable { + ScrollHandler, KeyDownHandler, FocusHandler, BlurHandler, Focusable { private static ArrayList<VWindow> windowOrder = new ArrayList<VWindow>(); @@ -221,7 +218,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, constructDOM(); contentPanel.addScrollHandler(this); contentPanel.addKeyDownHandler(this); - contentPanel.addKeyUpHandler(this); contentPanel.addFocusHandler(this); contentPanel.addBlurHandler(this); } @@ -1344,13 +1340,6 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner, } @Override - public void onKeyUp(KeyUpEvent event) { - if (isClosable() && event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) { - onCloseClick(); - } - } - - @Override public void onBlur(BlurEvent event) { if (client.hasEventListeners(this, EventId.BLUR)) { client.updateVariable(id, EventId.BLUR, "", true); |