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 {
Element rootElement = parent.getElement();
while (browseElement != null && browseElement != rootElement) {
+
ComponentConnector connector = ConnectorMap.get(client)
.getConnector(browseElement);
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;
+ }
}
/**