(*** This bug was imported into bugs.kde.org ***) Package: kjs Version: KDE 3.0.0 Severity: normal Installed from: Mandrake RPMs Compiler: n/a OS: Linux OS/Compiler notes: Not Specified the functions offsetTop and offsetLeft return 0 rather than the offset for links (A tags). For example: <html> <body> <a href="test.html">hello</a><br> <a href="test2.html">hello</a> <script language="JavaScript"> alert(document.getElementsByTagName("A")[1].offsetTop); </script> </body> </html> This should clearly return a non zero value we are retrieving the height of the second link (index 1) which is not at the top of the document. Even the first link should not return 0 with default margins padding etc. .offsetLeft does not work either in the same way (for links). (Submitted via bugs.kde.org)
Fixed in CVS, thanks for the report.
Unfortunately, it seems this is back in the current CVS of KDE. But it works in Safari, so this is something to be merged...
not accurate in 3.2.0 but works fine in HEAD