On Tuesday, July 17, 2012 2:06:41 PM UTC+2, Ed wrote: > > I show a widget in a popup: it's added to the RootPanel and then in a > deferred command I noticed that in Chrome the Widget is attached ( > Widget.isAttached() method equals true) but when calling > Document.get().isOrHasChild(widget.getElement()) it returns false.... I > think this should be true also, just like I see in Firefox. > > Any idea's why this is false in Chrome? > > This is strange, isOrHasChild uses contains(), and document.contains(someElt) returns true for me in Chrome Dev Tools. Note that Firefox uses a different code, based on http://www.quirksmode.org/blog/archives/2006/01/contains_for_mo.html (Node.contains has only been added in Firefox 9, according to the MDN https://developer.mozilla.org/en/DOM/Node.contains ), so it's not really a surprise that it returns a different value.
Have you tried Document.get().getBody().isOrHasChild(widget.getElement()) ? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wkPFiXpViVUJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
