]> CRI, Mines Paris - PSL - Plinn.git/blobdiff - skins/ajax_scripts/DHTMLapi.js
jslint.
[Plinn.git] / skins / ajax_scripts / DHTMLapi.js
index c45a914ab89cb810161e8d49a3221caf96d20c72..41e49f3ed353ce70d148cd0dbb54dc3be9371bdf 100755 (executable)
@@ -161,7 +161,9 @@ function getObjectLeft(obj)  {
 function getObjectTop(obj)  {
     var elem = getRawObject(obj);
     var result = 0;
 function getObjectTop(obj)  {
     var elem = getRawObject(obj);
     var result = 0;
-    if (document.defaultView) {
+    if (elem.offsetTop) {
+        result = elem.offsetTop;
+    } else if (document.defaultView) {
         var style = document.defaultView;
         var cssDecl = style.getComputedStyle(elem, "");
         result = cssDecl.getPropertyValue("top");
         var style = document.defaultView;
         var cssDecl = style.getComputedStyle(elem, "");
         result = cssDecl.getPropertyValue("top");