diff options
author | John Ahlroos <john@vaadin.com> | 2012-10-30 11:23:04 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-10-30 11:23:04 +0000 |
commit | 4f9dc41f4a076f789090ff8cadbff64946137ee9 (patch) | |
tree | 63d4e4a6a0276dfc500cfc51f9ebbb01f16a1d4f /client/src/com | |
parent | 88812ab9eed6b8e9babc3d9aac1cf13b5ee8750b (diff) | |
parent | d70d4c209d08cec79432e3740558a69b5b30e1d4 (diff) | |
download | vaadin-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.java | 8 |
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; |