diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-07-26 16:08:05 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-07-26 16:08:05 +0300 |
commit | 117f56a1ba2d4f857220f12f34c1bb51626cfbf3 (patch) | |
tree | 0ee1a2f2bd86898da359f75a5f1a758f94c5ef59 | |
parent | c87c864242cb7e335d0177ea953d3863354b5134 (diff) | |
download | vaadin-framework-117f56a1ba2d4f857220f12f34c1bb51626cfbf3.tar.gz vaadin-framework-117f56a1ba2d4f857220f12f34c1bb51626cfbf3.zip |
Actually we still need the VOverlay special case for situations where an overlay does not have a corresponding connector (eg. submenus) (#9172)
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/Util.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/Util.java b/src/com/vaadin/terminal/gwt/client/Util.java index 37a0b84094..9b085b3067 100644 --- a/src/com/vaadin/terminal/gwt/client/Util.java +++ b/src/com/vaadin/terminal/gwt/client/Util.java @@ -29,6 +29,7 @@ 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 { @@ -648,6 +649,7 @@ public class Util { Element rootElement = parent.getElement(); while (browseElement != null && browseElement != rootElement) { + ComponentConnector connector = ConnectorMap.get(client) .getConnector(browseElement); @@ -674,7 +676,15 @@ public class Util { browseElement = (Element) browseElement.getParentElement(); } - return null; + // No connector found, element is possibly inside a VOverlay + // If the overlay has an owner, try to find the owner's connector + VOverlay overlay = findWidget(element, VOverlay.class); + if (overlay != null && overlay.getOwner() != null) { + return getConnectorForElement(client, RootPanel.get(), overlay + .getOwner().getElement()); + } else { + return null; + } } /** |