From: Johannes Dahlström Date: Thu, 26 Jul 2012 11:55:46 +0000 (+0300) Subject: Fix tooltips in VOverlay/PopupPanel widgets; remove unneeded special case from Util... X-Git-Tag: 7.0.0.beta1~236^2~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c87c864242cb7e335d0177ea953d3863354b5134;p=vaadin-framework.git Fix tooltips in VOverlay/PopupPanel widgets; remove unneeded special case from Util.getConnectorForElement() (#9172) --- diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index 1bda2401f0..37a0b84094 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -29,7 +29,6 @@ import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.RenderInformation.FloatSize; import com.vaadin.terminal.gwt.client.communication.MethodInvocation; -import com.vaadin.terminal.gwt.client.ui.VOverlay; public class Util { @@ -675,15 +674,6 @@ public class Util { browseElement = (Element) browseElement.getParentElement(); } - if (browseElement == null) { - // Element is possibly inside a VOverlay - VOverlay overlay = findWidget(element, VOverlay.class); - if (overlay != null && overlay.getOwner() != null) { - return getConnectorForElement(client, RootPanel.get(), overlay - .getOwner().getElement()); - } - } - return null; } diff --git a/src/com/vaadin/terminal/gwt/client/VTooltip.java b/src/com/vaadin/terminal/gwt/client/VTooltip.java index 38d1235c69..a3523c2013 100644 --- a/src/com/vaadin/terminal/gwt/client/VTooltip.java +++ b/src/com/vaadin/terminal/gwt/client/VTooltip.java @@ -15,6 +15,7 @@ import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.FlowPanel; +import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ui.VOverlay; @@ -255,8 +256,8 @@ public class VTooltip extends VOverlay { */ private boolean resolveConnector(Element element) { - ComponentConnector connector = Util.getConnectorForElement(ac, ac - .getRootConnector().getWidget(), element); + ComponentConnector connector = Util.getConnectorForElement(ac, + RootPanel.get(), element); // Try to find first connector with proper tooltip info TooltipInfo info = null;