diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-05-20 16:45:56 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-05-20 16:45:56 +0300 |
commit | 34e6c60a5a746c0306c3a84ae8d6c21dfd84d878 (patch) | |
tree | 270bc467412a1bab6968c4f59b709f3145c7fb07 /client/src/com | |
parent | 0c8edf1ff0502070d92dc6d8ef5af304d7570934 (diff) | |
download | vaadin-framework-34e6c60a5a746c0306c3a84ae8d6c21dfd84d878.tar.gz vaadin-framework-34e6c60a5a746c0306c3a84ae8d6c21dfd84d878.zip |
Always add tooltip event handlers for Window (#11448)
This is needed to ensure tooltips are closed when moving the mouse
outside the component but still inside the window. In 7.1, this should
instead be implemented by overriding hasTooltip() to return true.
Merge: manual
Change-Id: I48d47474a4e4f0303fd85552612f6960fcdce0a7
Diffstat (limited to 'client/src/com')
-rw-r--r-- | client/src/com/vaadin/client/ui/window/WindowConnector.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java index 8cfc25a9dc..a394a33882 100644 --- a/client/src/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java @@ -29,6 +29,7 @@ import com.vaadin.client.ComponentConnector; import com.vaadin.client.ConnectorHierarchyChangeEvent; import com.vaadin.client.LayoutManager; import com.vaadin.client.Paintable; +import com.vaadin.client.TooltipInfo; import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.ui.AbstractSingleComponentContainerConnector; @@ -312,4 +313,14 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector public void setWindowOrderAndPosition() { getWidget().setWindowOrderAndPosition(); } + + @Override + public TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element) { + /* + * Override method to make AbstractComponentConnector.hasTooltip() + * return true so there's a top level handler that takes care of hiding + * tooltips whenever the mouse is moved somewhere else. + */ + return super.getTooltipInfo(element); + } } |