From: Leif Åstrand Date: Tue, 19 Feb 2013 09:49:15 +0000 (+0200) Subject: Ensure there's always a listener on VUI for closing tooltips (#11051) X-Git-Tag: 7.0.1~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41e55b6e3887556be5c68ae0bceb65d6091140ac;p=vaadin-framework.git Ensure there's always a listener on VUI for closing tooltips (#11051) Change-Id: I04e8b1777bc4bf4f64371e4b6e6d77f3754162ad --- 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. *