summaryrefslogtreecommitdiffstats
path: root/client/src/com
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-10-30 11:23:04 +0000
committerVaadin Code Review <review@vaadin.com>2012-10-30 11:23:04 +0000
commit4f9dc41f4a076f789090ff8cadbff64946137ee9 (patch)
tree63d4e4a6a0276dfc500cfc51f9ebbb01f16a1d4f /client/src/com
parent88812ab9eed6b8e9babc3d9aac1cf13b5ee8750b (diff)
parentd70d4c209d08cec79432e3740558a69b5b30e1d4 (diff)
downloadvaadin-framework-4f9dc41f4a076f789090ff8cadbff64946137ee9.tar.gz
vaadin-framework-4f9dc41f4a076f789090ff8cadbff64946137ee9.zip
Merge "Stop attempting to build dom path if reaching the root (#9534)"
Diffstat (limited to 'client/src/com')
-rw-r--r--client/src/com/vaadin/client/ComponentLocator.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java
index 47fb29777c..d24b12ffe5 100644
--- a/client/src/com/vaadin/client/ComponentLocator.java
+++ b/client/src/com/vaadin/client/ComponentLocator.java
@@ -19,6 +19,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HasWidgets;
@@ -371,14 +372,17 @@ public class ComponentLocator {
path = PARENTCHILD_SEPARATOR + "domChild[" + childIndex + "]"
+ path;
- Element parent = e.getParentElement().cast();
+ JavaScriptObject parent = e.getParentElement();
+ if (parent == null) {
+ return null;
+ }
// The parent check is a work around for Firefox 15 which fails to
// compare elements properly (#9534)
if (parent == baseElement) {
break;
}
- e = parent;
+ e = parent.cast();
}
return path;