diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index 0a7fff65..d7470180 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -35,6 +35,11 @@ L.DomUtil = { do { top += el.offsetTop || 0; left += el.offsetLeft || 0; + + //add borders + top += parseInt(L.DomUtil.getStyle(el, "borderTopWidth"), 10) || 0; + left += parseInt(L.DomUtil.getStyle(el, "borderLeftWidth"), 10) || 0; + pos = L.DomUtil.getStyle(el, 'position'); if (el.offsetParent === docBody && pos === 'absolute') { break; }