X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3e0a2c257d49fb162da9c70d2f70194036235166..f53850f9b9d8071258091d66b4c781f2f4399d72:/skins/ajax_scripts/DHTMLapi.js?ds=sidebyside 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");