diff options
author | Artur Signell <artur@vaadin.com> | 2013-03-25 14:16:59 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-03-25 14:22:12 +0200 |
commit | 735405243226107b4a8463a962c8f76976a7468b (patch) | |
tree | b54003530ef83806fc04466c36b1ea5f57e6fb75 /client | |
parent | 423ff03e4b5fe3a99d2e6d3603d8e58f5ca34e29 (diff) | |
download | vaadin-framework-735405243226107b4a8463a962c8f76976a7468b.tar.gz vaadin-framework-735405243226107b4a8463a962c8f76976a7468b.zip |
Fixed ComponentLocator to be backwards compatible
The WAI-ARIA fix (#11180) introduced a new FlowPanel in a PopupDateField popup which is now handled properly.
Change-Id: I192018c95d6d1502e3a50e5c30d4125d467ddf94
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ComponentLocator.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 05603e8abe..543877448a 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -28,6 +28,7 @@ import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ui.SubPartAware; import com.vaadin.client.ui.VCssLayout; import com.vaadin.client.ui.VGridLayout; +import com.vaadin.client.ui.VOverlay; import com.vaadin.client.ui.VTabsheetPanel; import com.vaadin.client.ui.VUI; import com.vaadin.client.ui.VWindow; @@ -565,7 +566,8 @@ public class ComponentLocator { // ChildComponentContainer and VOrderedLayout$Slot have been // replaced with Slot if (w instanceof VAbstractOrderedLayout - && ("ChildComponentContainer".equals(widgetClassName) || "VOrderedLayout$Slot" + && ("ChildComponentContainer" + .equals(widgetClassName) || "VOrderedLayout$Slot" .equals(widgetClassName))) { widgetClassName = "Slot"; } @@ -575,7 +577,12 @@ public class ComponentLocator { // is always 0 which indicates the widget in the active tab widgetPosition = 0; } - + if (w instanceof VOverlay + && "VCalendarPanel".equals(widgetClassName)) { + // Vaadin 7.1 adds a wrapper for datefield popups + parent = (Iterable<?>) ((Iterable) parent).iterator() + .next(); + } /* * The new grid and ordered layotus do not contain * ChildComponentContainer widgets. This is instead simulated by @@ -585,7 +592,8 @@ public class ComponentLocator { * ChildComponentContainer) */ if ((w instanceof VGridLayout) - && "ChildComponentContainer".equals(widgetClassName) + && "ChildComponentContainer" + .equals(widgetClassName) && i + 1 < parts.length) { HasWidgets layout = (HasWidgets) w; |