IE 6 / getAbsoluteLeft() => Javascript divide by 0

33 views
Skip to first unread message

David Bonneau

unread,
Nov 24, 2011, 6:00:46 AM11/24/11
to google-we...@googlegroups.com
Hello,

I encounter an issue when I use the method DOMImpl.getAbsoluteLeft(). The method return a value of -2147482564. It occurs only on Internet Explorer 6.

I dig in the code, and found the following problem :
- getAbsoluteLeft() call a private methode : getZoomMultiple()
- getZoomMultiple use : doc.getBody().getParentElement().getOffsetWidth() translated in javascript by : document.body.parentNode.offsetWidth

And in my use case document.body.parentNode.offsetWidth return 0 !!! I don't understand why document.body.parentNode.offsetWidth have a value of 0. I try on Internet Explorer 7 and it works !

Searching on the web, I found the following issue : http://code.google.com/p/google-web-toolkit/issues/detail?id=3564, but here it's body.offsetWidth that returns 0 and not body.parentNode.offsetWidth

What I am making wrong ? (My element is already attach to the DOM, when I call getAbsoluteLeft()). 
Is there a way to patch the code by defferedBinding (DOMImpl -> DOMImplIE6 -> MyOwnDOMImplIE6)


Cheers

David

Reply all
Reply to author
Forward
0 new messages