From e517a95a338d60bf8c63480b4a919f03ee2ff61b Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Wed, 5 Sep 2012 13:54:52 +0300 Subject: [PATCH] Fixed interpreting caption domNode paths in VBoxLayout in ComponentLocator --- client/src/com/vaadin/client/ComponentLocator.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index f57946eea8..42b54ca49c 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -271,9 +271,14 @@ public class ComponentLocator { part.length() - 1); if (Util.findWidget(baseElement, null) instanceof VBoxLayout) { - Element e = baseElement.getFirstChildElement().cast(); - if (e.getClassName().equals("v-expand")) { - element = e; + if (element.hasChildNodes()) { + Element e = element.getFirstChildElement().cast(); + String cn = e.getClassName(); + if (cn != null + && (cn.equals("v-expand") || cn + .contains("v-has-caption"))) { + element = e; + } } } -- 2.39.5