summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2010-07-01 05:18:19 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2010-07-01 05:18:19 +0000
commit8f886a34195422d5bb682765214cff455feb9eb3 (patch)
treecbc8a5071e4bfb462d36778533e3a49bd64a20e7 /src
parentd31283d0afe8cd23325accf3f26c49a17d3c54a4 (diff)
downloadvaadin-framework-8f886a34195422d5bb682765214cff455feb9eb3.tar.gz
vaadin-framework-8f886a34195422d5bb682765214cff455feb9eb3.zip
Fix for #5059 - Tabbing out of a PopupView closes it if hideOnMouseOut is true.
svn changeset:13983/svn branch:6.4
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VPopupView.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
index 00c2ae5260..a2f04e785c 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupView.java
@@ -10,6 +10,7 @@ import java.util.Set;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.logical.shared.CloseEvent;
import com.google.gwt.event.logical.shared.CloseHandler;
import com.google.gwt.user.client.DOM;
@@ -25,13 +26,13 @@ import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.Container;
import com.vaadin.terminal.gwt.client.Paintable;
+import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.RenderSpace;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
import com.vaadin.terminal.gwt.client.VCaption;
import com.vaadin.terminal.gwt.client.VCaptionWrapper;
import com.vaadin.terminal.gwt.client.VTooltip;
-import com.vaadin.terminal.gwt.client.RenderInformation.Size;
import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;
public class VPopupView extends HTML implements Container, Iterable<Widget> {
@@ -261,13 +262,22 @@ public class VPopupView extends HTML implements Container, Iterable<Widget> {
}
if (!eventTargetsPopup && type == Event.ONMOUSEMOVE) {
-
if (hasHadMouseOver && hideOnMouseOut) {
hide();
return true;
}
}
+ // Was the TAB key released outside of our popup?
+ if (!eventTargetsPopup && type == Event.ONKEYUP
+ && event.getKeyCode() == KeyCodes.KEY_TAB) {
+ // Should we hide on focus out (mouse out)?
+ if (hideOnMouseOut) {
+ hide();
+ return true;
+ }
+ }
+
return super.onEventPreview(event);
}
@@ -350,7 +360,6 @@ public class VPopupView extends HTML implements Container, Iterable<Widget> {
popupComponentPaintable
.updateFromUIDL(uidl.getChildUIDL(0), client);
-
}
public void unregisterPaintables() {