Sunday, September 5, 2010

Strange behaviour

Hi,

I'm trying to set the position of a popup, which should appear below an element (class com.google.gwt.dom.client.Element) which I get from a NativeEvent, by doing :

Element element = Element.as(event.getEventTarget());
popup.setPopupPosition(element.getAbsoluteLeft(),  element.getAbsoluteTop()+20);

This works fine in Chrome. In Firefox (3.6.8), it also works if i'm at the top of the browser, but when I scroll down, element.getAbsoluteTop() seems to be the distance between my element and the top of window's client area, ie not the absolute value.

I already used this code when my element was a widget, and it worked fine in Firefox. Any ideas what I'm doing wrong / of a possible workaround ?
Thanks in advance,

-- 
Tanguy

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment