From 41e55b6e3887556be5c68ae0bceb65d6091140ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Tue, 19 Feb 2013 11:49:15 +0200 Subject: [PATCH] Ensure there's always a listener on VUI for closing tooltips (#11051) Change-Id: I04e8b1777bc4bf4f64371e4b6e6d77f3754162ad --- client/src/com/vaadin/client/ui/ui/UIConnector.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index 800f809ade..0fb7439587 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -44,6 +44,7 @@ import com.vaadin.client.ConnectorHierarchyChangeEvent; import com.vaadin.client.ConnectorMap; import com.vaadin.client.Focusable; import com.vaadin.client.Paintable; +import com.vaadin.client.TooltipInfo; import com.vaadin.client.UIDL; import com.vaadin.client.VConsole; import com.vaadin.client.communication.StateChangeEvent; @@ -473,6 +474,16 @@ public class UIConnector extends AbstractSingleComponentContainerConnector } } + @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); + } + /** * Tries to scroll the viewport so that the given connector is in view. * -- 2.39.5