Re: Document.get().isOrHasChild(element) != isAttached() in CHrome ??
I ust run some tests and noticed the following in Chrome (in FF 12 they all return true): 1) Document.get().isOrHasChild(element) - false 2) Document.get().getDocumentElement().isOrHasChild(element) - true 3) Document.get().getBody().isOrHasChild(element) - true 4) widget.isAttache() - true Appearantly there is a difference between being attached to the Document node and Body node. Why? What to do next to isolate/solve this? Note: the above statements are called in a DeferedCommand just after the widget is added to the RootPanel. It concers an widget that is shown as a popup panel (absolute positioned) - Ed -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Document.get().isOrHasChild(element) != isAttached() in CHrome ??
On 07/19/2012 02:51 AM, Ed Bras wrote: I ust run some tests and noticed the following in Chrome (in FF 12 they all return true): Well, that's annoying... 1) Document.get().isOrHasChild(element) - false 2) Document.get().getDocumentElement().isOrHasChild(element) - true 3) Document.get().getBody().isOrHasChild(element) - true 4) widget.isAttache() - true Appearantly there is a difference between being attached to the Document node and Body node. Why? What to do next to isolate/solve this? What problem is it you're trying to solve? That's going to dictate the solution. Note: the above statements are called in a DeferedCommand just after the widget is added to the RootPanel. It concers an widget that is shown as a popup panel (absolute positioned) Maybe a clickHandler(), but again, what problem is it you're trying to solve? Cheers, jec -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Document.get().isOrHasChild(element) != isAttached() in CHrome ??
What problem is it you're trying to solve? That's going to dictate the solution. The problem is solved: not using the method construction: Document.get().isOrHasChild(element). Instead I use: Document.get().getDocumentElement().isOrHasChild(element) But, the outcome smells like a bug, so maybe somebody can try to reproduce this. If you can reproduce it, it's a bug, otherwise I might have to dig deeper and make an isolated test and hope I can still reproduce it. If so, I can drop the test here. Or maybe it's just some stupid coding mistake I overlook. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Document.get().isOrHasChild(element) != isAttached() in CHrome ??
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? - Ed -- 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/-/qlaGdbyGo_0J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Document.get().isOrHasChild(element) != isAttached() in CHrome ??
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 google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Document.get().isOrHasChild(element) != isAttached() in CHrome ??
Thanks Thomas for ur feedback. I am still using FF 6.0 (because of the plugin hassle) ;)... I am just about to push a test release and then have planned to update FF and it's plugin I will test it again then... (also with Document.get().getBody(). isOrHasChild(widget.getElement()) ) To be continued... On Tue, Jul 17, 2012 at 4:57 PM, Thomas Broyer t.bro...@gmail.com wrote: 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 google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.