diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index b7bf6a03..98ad9668 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -29,6 +29,7 @@ L.DomUtil = { left = 0, el = element, docBody = document.body, + docEl = document.documentElement, pos, ie7 = L.Browser.ie7; @@ -45,8 +46,8 @@ L.DomUtil = { if (el.offsetParent === docBody && pos === 'absolute') { break; } if (pos === 'fixed') { - top += docBody.scrollTop || 0; - left += docBody.scrollLeft || 0; + top += docBody.scrollTop || docEl.scrollTop || 0; + left += docBody.scrollLeft || docEl.scrollLeft || 0; break; } el = el.offsetParent;