From 56dfc2f96b5590d925ed296b519fb93dda2284ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Fri, 26 Nov 2010 22:09:58 +0100 Subject: [PATCH 1/1] bugfix de la fonction getObjectTop. --- skins/ajax_scripts/DHTMLapi.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skins/ajax_scripts/DHTMLapi.js b/skins/ajax_scripts/DHTMLapi.js index c45a914..41e49f3 100755 --- a/skins/ajax_scripts/DHTMLapi.js +++ b/skins/ajax_scripts/DHTMLapi.js @@ -161,7 +161,9 @@ function getObjectLeft(obj) { 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"); -- 2.20.1