fix scrolled document mouse position bug

This commit is contained in:
Mourner 2011-03-24 16:51:27 +02:00
parent 5b3cb28613
commit 6f2e8c79c9

View File

@ -23,7 +23,7 @@ L.DomUtil = {
var top = 0,
left = 0;
do {
top += (el.offsetTop - el.scrollTop) || 0;
top += el.offsetTop || 0;
left += el.offsetLeft || 0;
el = el.offsetParent;
} while (el);