gwt /
gwt /
8edca17c044a8f3b83811ab9d3db227a509fff41 Fixing a null reference exception in Mozilla when calling getBodyOffsetLeft/Top.
The problem occurs when running getBodyOffsetLeft/Top in an iframe that is not currently visible, such as via display:none. In this case, $wnd.getComputedStyle returns null. Fix this by null-checking the return value from getComputedStyle, and returning 0 for the body offset in this case. This should be safe to do since returning 0 is the default behavior defined in DOMImpl, and so is presumably used in other browsers.
This is related to issue 4056 and implements a fix posted by a commenter. Other issues reported in the bug likely still remain, however.
Change-Id: I074f66ba12128b83ee2a98f3af84bafdc46746e2
Review-Link: https://gwt-review.googlesource.com/#/c/1510/
Review by: skybrian@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11432 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 file changed